max minimum value on max_memory

Former-commit-id: 49e60b3671
pull/1161/head
Piero Toffanin 2018-03-19 22:16:26 -04:00
rodzic 8e48448829
commit 80409731ce
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -42,7 +42,7 @@ class Cropper:
'geotiffInput': original_geotiff,
'geotiffOutput': geotiff_path,
'options': ' '.join(map(lambda k: '-co {}={}'.format(k, gdal_options[k]), gdal_options)),
'max_memory': (100 - virtual_memory().percent) / 2
'max_memory': max(5, (100 - virtual_memory().percent) / 2)
}
run('gdalwarp -cutline {shapefile_path} '

Wyświetl plik

@ -111,7 +111,7 @@ class ODMOrthoPhotoCell(ecto.Cell):
'png': tree.odm_orthophoto_file,
'tiff': tree.odm_orthophoto_tif,
'log': tree.odm_orthophoto_tif_log,
'max_memory': (100 - virtual_memory().percent) / 2
'max_memory': max(5, (100 - virtual_memory().percent) / 2)
}
system.run('gdal_translate -a_ullr {ulx} {uly} {lrx} {lry} '