Options choices syntax fix, changed DEM compression to DEFLATE

Former-commit-id: 790088249f
pull/1161/head
Piero Toffanin 2020-09-14 14:44:45 +00:00
rodzic aa7ec13c20
commit 5d793ce58e
3 zmienionych plików z 10 dodań i 8 usunięć

Wyświetl plik

@ -144,7 +144,7 @@ def config(argv=None):
default='sift',
choices=['sift', 'hahog'],
help=('Choose the algorithm for extracting keypoints and computing descriptors. '
'Can be one of: [sift, hahog]. Default: '
'Can be one of: %(choices)s. Default: '
'%(default)s'))
parser.add_argument('--feature-quality',
@ -153,7 +153,7 @@ def config(argv=None):
default='high',
choices=['ultra', 'high', 'medium', 'low', 'lowest'],
help=('Set feature extraction quality. Higher quality generates better features, but requires more memory and takes longer. '
'Can be one of: [ultra, high, medium, low, lowest]. Default: '
'Can be one of: %(choices)s. Default: '
'%(default)s'))
parser.add_argument('--matcher-neighbors',
@ -204,7 +204,7 @@ def config(argv=None):
help=('Set a camera projection type. Manually setting a value '
'can help improve geometric undistortion. By default the application '
'tries to determine a lens type from the images metadata. Can be '
'set to one of: [auto, perspective, brown, fisheye, spherical]. Default: '
'set to one of: %(choices)s. Default: '
'%(default)s'))
parser.add_argument('--radiometric-calibration',
@ -217,7 +217,7 @@ def config(argv=None):
'to obtain reflectance values (otherwise you will get digital number values). '
'[camera] applies black level, vignetting, row gradient gain/exposure compensation (if appropriate EXIF tags are found). '
'[camera+sun] is experimental, applies all the corrections of [camera], plus compensates for spectral radiance registered via a downwelling light sensor (DLS) taking in consideration the angle of the sun. '
'Can be set to one of: [none, camera, camera+sun]. Default: '
'Can be set to one of: %(choices)s. Default: '
'%(default)s'))
parser.add_argument('--max-concurrency',
@ -616,9 +616,7 @@ def config(argv=None):
type=str,
choices=['JPEG', 'LZW', 'PACKBITS', 'DEFLATE', 'LZMA', 'NONE'],
default='DEFLATE',
help='Set the compression to use. Note that this could '
'break gdal_translate if you don\'t know what you '
'are doing. Options: %(choices)s.\nDefault: %(default)s')
help='Set the compression to use for orthophotos. Options: %(choices)s.\nDefault: %(default)s')
parser.add_argument('--orthophoto-cutline',
action=StoreTrue,

Wyświetl plik

@ -236,11 +236,15 @@ def create_dem(input_point_cloud, dem_type, output_type='max', radiuses=['0.56']
run('gdalbuildvrt -resolution highest -r bilinear "%s" "%s" "%s"' % (merged_vrt_path, geotiff_small_filled_path, geotiff_tmp_path))
run('gdal_translate '
'-co NUM_THREADS={threads} '
'-co TILED=YES '
'-co COMPRESS=DEFLATE '
'--config GDAL_CACHEMAX {max_memory}% '
'{merged_vrt} {geotiff}'.format(**kwargs))
else:
run('gdal_translate '
'-co NUM_THREADS={threads} '
'-co TILED=YES '
'-co COMPRESS=DEFLATE '
'--config GDAL_CACHEMAX {max_memory}% '
'{tiles_vrt} {geotiff}'.format(**kwargs))

Wyświetl plik

@ -2,7 +2,7 @@
def get_dem_vars(args):
return {
'TILED': 'YES',
'COMPRESS': 'LZW',
'COMPRESS': 'DEFLATE',
'BLOCKXSIZE': 512,
'BLOCKYSIZE': 512,
'BIGTIFF': 'IF_SAFER',