Automatically set --cog if postprocessing is required (#155)

pull/156/head v2.1.7
Piero Toffanin 2021-06-04 15:36:27 -04:00 zatwierdzone przez GitHub
rodzic d80ec213c6
commit e809c96d7b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 20 dodań i 1 usunięć

Wyświetl plik

@ -84,6 +84,25 @@ module.exports = class Task{
}
},
cb => {
// If we need to post process results
// if cog is supported (build cloud optimized geotiffs)
// we automatically add the cog option to the task options by default
if (this.skipPostProcessing) cb();
else{
odmInfo.supportsOption("cog", (err, supported) => {
if (err){
console.warn(`Cannot check for supported option cog: ${err}`);
}else if (supported){
if (!this.options.find(opt => opt.name === "cog")){
this.options.push({ name: 'cog', value: true });
}
}
cb();
});
}
},
// Read images info
cb => {
fs.readdir(this.getImagesFolderPath(), (err, files) => {

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "NodeODM",
"version": "2.1.6",
"version": "2.1.7",
"description": "REST API to access ODM",
"main": "index.js",
"scripts": {