Skip to content

Commit fc5c87e

Browse files
committed
Fix alignment file search
1 parent 5d6c1e7 commit fc5c87e

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

docs/index.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ REST API to access ODM
88

99
=== Version information
1010
[%hardbreaks]
11-
_Version_ : 2.1.4
11+
_Version_ : 2.2.1
1212

1313

1414
=== Contact information
@@ -340,7 +340,7 @@ _optional_|Token required for authentication (when authentication is required).|
340340
|*FormData*|*dateCreated* +
341341
_optional_|An optional timestamp overriding the default creation date of the task.|integer|
342342
|*FormData*|*images* +
343-
_optional_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
343+
_optional_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
344344
|*FormData*|*name* +
345345
_optional_|An optional name to be associated with the task|string|
346346
|*FormData*|*options* +
@@ -503,7 +503,7 @@ _required_|UUID of the task|string|
503503
|*Query*|*token* +
504504
_optional_|Token required for authentication (when authentication is required).|string|
505505
|*FormData*|*images* +
506-
_required_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
506+
_required_|Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.|file|
507507
|===
508508

509509

docs/swagger.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ app.post('/task/new/init', authCheck, taskNew.assignUUID, formDataParser, taskNe
142142
* -
143143
* name: images
144144
* in: formData
145-
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
145+
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
146146
* required: true
147147
* type: file
148148
* -
@@ -209,7 +209,7 @@ app.post('/task/new/commit/:uuid', authCheck, taskNew.getUUID, taskNew.handleCom
209209
* -
210210
* name: images
211211
* in: formData
212-
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt) or seed file (seed.zip). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
212+
* description: Images to process, plus optional files such as a GEO file (geo.txt), image groups file (image_groups.txt), GCP file (*.txt), seed file (seed.zip) or alignment files (align.las, align.laz, align.tif). If included, the GCP file should have .txt extension. If included, the seed archive pre-polulates the task directory with its contents.
213213
* required: false
214214
* type: file
215215
* -

libs/Task.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ module.exports = class Task{
8989
this.imageGroupsFiles.push(file);
9090
}else if (/\.txt$/gi.test(file)){
9191
this.gcpFiles.push(file);
92-
}else if (/^align.(tif|laz|las)$/.test(file)){
92+
}else if (/^align\.(tif|laz|las)$/gi.test(file)){
9393
this.alignFiles.push(file);
9494
}
95+
logger.debug(file);
9596
});
9697
logger.debug(`Found ${this.gcpFiles.length} GCP files (${this.gcpFiles.join(" ")}) for ${this.uuid}`);
9798
logger.debug(`Found ${this.geoFiles.length} GEO files (${this.geoFiles.join(" ")}) for ${this.uuid}`);

libs/taskNew.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,13 @@ module.exports = {
363363
},
364364

365365
cb => {
366-
// Find any *.txt (GCP) file and move it to the data/<uuid>/gcp directory
366+
// Find any *.txt (GCP) file or alignment file and move it to the data/<uuid>/gcp directory
367367
// also remove any lingering zipurl.zip
368368
fs.readdir(destImagesPath, (err, entries) => {
369369
if (err) cb(err);
370370
else {
371371
async.eachSeries(entries, (entry, cb) => {
372-
if (/\.txt$/gi.test(entry)) {
372+
if (/\.txt$/gi.test(entry) || /^align\.(las|laz|tif)$/gi.test(entry)) {
373373
mv(path.join(destImagesPath, entry), path.join(destGcpPath, entry), cb);
374374
}else if (/\.zip$/gi.test(entry)){
375375
fs.unlink(path.join(destImagesPath, entry), cb);

public/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $(function() {
119119
url : "/task/new/upload/",
120120
parallelUploads: 8, // http://blog.olamisan.com/max-parallel-http-connections-in-a-browser max parallel connections
121121
uploadMultiple: false,
122-
acceptedFiles: "image/*,text/*,application/*",
122+
acceptedFiles: "image/*,text/*,application/*,.las,.laz",
123123
autoProcessQueue: false,
124124
createImageThumbnails: false,
125125
previewTemplate: '<div style="display:none"></div>',

tests/odm_options.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)