kopia lustrzana https://github.com/OpenDroneMap/NodeODM
commit
0ef678471e
|
@ -8,7 +8,7 @@ REST API to access ODM
|
|||
|
||||
=== Version information
|
||||
[%hardbreaks]
|
||||
_Version_ : 2.1.0
|
||||
_Version_ : 2.1.3
|
||||
|
||||
|
||||
=== Contact information
|
||||
|
@ -18,7 +18,7 @@ _Contact_ : Piero Toffanin
|
|||
|
||||
=== License information
|
||||
[%hardbreaks]
|
||||
_License_ : GPL-3.0
|
||||
_License_ : AGPL-3.0
|
||||
|
||||
|
||||
=== URI scheme
|
||||
|
@ -340,7 +340,7 @@ _optional_|Token required for authentication (when authentication is required).|
|
|||
|*FormData*|*dateCreated* +
|
||||
_optional_|An optional timestamp overriding the default creation date of the task.|integer|
|
||||
|*FormData*|*images* +
|
||||
_optional_|Images to process, plus an optional GCP file (*.txt) and/or an optional 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|
|
||||
_optional_|Images to process, plus an optional GEO file (geo.txt) and/or an optional GCP file (*.txt) and/or an optional 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|
|
||||
|*FormData*|*name* +
|
||||
_optional_|An optional name to be associated with the task|string|
|
||||
|*FormData*|*options* +
|
||||
|
@ -352,7 +352,7 @@ _optional_|When set, skips generation of point cloud tiles.|boolean|
|
|||
|*FormData*|*webhook* +
|
||||
_optional_|Optional URL to call when processing has ended (either successfully or unsuccessfully).|string|
|
||||
|*FormData*|*zipurl* +
|
||||
_optional_|URL of the zip file containing the images to process, plus an optional GCP file. If included, the GCP file should have .txt extension|string|
|
||||
_optional_|URL of the zip file containing the images to process, plus an optional GEO file and/or an optional GCP file. If included, the GCP file should have .txt extension|string|
|
||||
|===
|
||||
|
||||
|
||||
|
@ -503,7 +503,7 @@ _required_|UUID of the task|string|
|
|||
|*Query*|*token* +
|
||||
_optional_|Token required for authentication (when authentication is required).|string|
|
||||
|*FormData*|*images* +
|
||||
_required_|Images to process, plus an optional GCP file (*.txt) and/or an optional 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|
|
||||
_required_|Images to process, plus an optional GEO file (geo.txt) and/or an optional GCP file (*.txt) and/or an optional 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|
|
||||
|===
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
6
index.js
6
index.js
|
@ -138,7 +138,7 @@ app.post('/task/new/init', authCheck, taskNew.assignUUID, formDataParser, taskNe
|
|||
* -
|
||||
* name: images
|
||||
* in: formData
|
||||
* description: Images to process, plus an optional GCP file (*.txt) and/or an optional 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.
|
||||
* description: Images to process, plus an optional GEO file (geo.txt) and/or an optional GCP file (*.txt) and/or an optional 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.
|
||||
* required: true
|
||||
* type: file
|
||||
* -
|
||||
|
@ -205,13 +205,13 @@ app.post('/task/new/commit/:uuid', authCheck, taskNew.getUUID, taskNew.handleCom
|
|||
* -
|
||||
* name: images
|
||||
* in: formData
|
||||
* description: Images to process, plus an optional GCP file (*.txt) and/or an optional 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.
|
||||
* description: Images to process, plus an optional GEO file (geo.txt) and/or an optional GCP file (*.txt) and/or an optional 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.
|
||||
* required: false
|
||||
* type: file
|
||||
* -
|
||||
* name: zipurl
|
||||
* in: formData
|
||||
* description: URL of the zip file containing the images to process, plus an optional GCP file. If included, the GCP file should have .txt extension
|
||||
* description: URL of the zip file containing the images to process, plus an optional GEO file and/or an optional GCP file. If included, the GCP file should have .txt extension
|
||||
* required: false
|
||||
* type: string
|
||||
* -
|
||||
|
|
|
@ -48,6 +48,7 @@ module.exports = class Task{
|
|||
this.setStatus(statusCodes.QUEUED);
|
||||
this.options = options;
|
||||
this.gcpFiles = [];
|
||||
this.geoFiles = [];
|
||||
this.output = [];
|
||||
this.runningProcesses = [];
|
||||
this.webhook = webhook;
|
||||
|
@ -74,11 +75,14 @@ module.exports = class Task{
|
|||
if (err) cb(err);
|
||||
else{
|
||||
files.forEach(file => {
|
||||
if (/\.txt$/gi.test(file)){
|
||||
if (/^geo\.txt$/gi.test(file)){
|
||||
this.geoFiles.push(file);
|
||||
}else if (/\.txt$/gi.test(file)){
|
||||
this.gcpFiles.push(file);
|
||||
}
|
||||
});
|
||||
logger.debug(`Found ${this.gcpFiles.length} GCP files (${this.gcpFiles.join(" ")}) for ${this.uuid}`);
|
||||
logger.debug(`Found ${this.geoFiles.length} GEO files (${this.geoFiles.join(" ")}) for ${this.uuid}`);
|
||||
cb(null);
|
||||
}
|
||||
});
|
||||
|
@ -463,6 +467,9 @@ module.exports = class Task{
|
|||
if (this.gcpFiles.length > 0){
|
||||
runnerOptions.gcp = fs.realpathSync(path.join(this.getGcpFolderPath(), this.gcpFiles[0]));
|
||||
}
|
||||
if (this.geoFiles.length > 0){
|
||||
runnerOptions.geo = fs.realpathSync(path.join(this.getGcpFolderPath(), this.geoFiles[0]));
|
||||
}
|
||||
|
||||
this.runningProcesses.push(odmRunner.run(runnerOptions, this.uuid, (err, code, signal) => {
|
||||
if (err){
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "NodeODM",
|
||||
"version": "2.1.2",
|
||||
"version": "2.1.3",
|
||||
"description": "REST API to access ODM",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Ładowanie…
Reference in New Issue