Merge pull request #189 from pierotofy/codem

Support for alignment files
pull/191/head
Piero Toffanin 2022-12-14 02:01:36 -05:00 zatwierdzone przez GitHub
commit 6b4006abf7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -50,6 +50,7 @@ module.exports = class Task{
this.options = options;
this.gcpFiles = [];
this.geoFiles = [];
this.alignFiles = [];
this.imageGroupsFiles = [];
this.output = [];
this.runningProcesses = [];
@ -88,11 +89,15 @@ module.exports = class Task{
this.imageGroupsFiles.push(file);
}else if (/\.txt$/gi.test(file)){
this.gcpFiles.push(file);
}else if (/^align.(tif|laz|las)$/.test(file)){
this.alignFiles.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}`);
logger.debug(`Found ${this.imageGroupsFiles.length} image groups files (${this.imageGroupsFiles.join(" ")}) for ${this.uuid}`);
logger.debug(`Found ${this.alignFiles.length} alignment files (${this.alignFiles.join(" ")}) for ${this.uuid}`);
cb(null);
}
});
@ -558,6 +563,9 @@ module.exports = class Task{
if (this.geoFiles.length > 0){
runnerOptions.geo = fs.realpathSync(path.join(this.getGcpFolderPath(), this.geoFiles[0]));
}
if (this.alignFiles.length > 0){
runnerOptions.align = fs.realpathSync(path.join(this.getGcpFolderPath(), this.alignFiles[0]));
}
if (this.imageGroupsFiles.length > 0){
runnerOptions["split-image-groups"] = fs.realpathSync(path.join(this.getGcpFolderPath(), this.imageGroupsFiles[0]));
}

Wyświetl plik

@ -82,7 +82,7 @@ module.exports = {
// (num cores can be set programmatically, so can gcpFile, etc.)
if (["-h", "--project-path", "--cmvs-maxImages", "--time",
"--zip-results", "--pmvs-num-cores",
"--start-with", "--gcp", "--images", "--geo",
"--start-with", "--gcp", "--images", "--geo", "--align",
"--split-image-groups", "--copy-to",
"--rerun-all", "--rerun",
"--slam-config", "--video", "--version", "name"].indexOf(option) !== -1) continue;