kopia lustrzana https://github.com/OpenDroneMap/ODM
Add BigTIFF creation option to odm_orthophoto
rodzic
7b440295db
commit
3ce495c37b
|
@ -344,6 +344,11 @@ def config():
|
|||
'break gdal_translate if you don\'t know what you '
|
||||
'are doing. Options: %(choices)s.\nDefault: %(default)s')
|
||||
|
||||
parser.add_argument('--orthophoto-bigtiff',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Set this parameter if you expect a big orthophoto.')
|
||||
|
||||
parser.add_argument('--zip-results',
|
||||
action='store_true',
|
||||
default=False,
|
||||
|
|
|
@ -76,6 +76,7 @@ class ODMApp(ecto.BlackBox):
|
|||
t_srs=p.args.orthophoto_target_srs,
|
||||
no_tiled=p.args.orthophoto_no_tiled,
|
||||
compress=p.args.orthophoto_compression,
|
||||
bigtiff=p.args.orthophoto_bigtiff,
|
||||
verbose=p.args.verbose)
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ class ODMOrthoPhotoCell(ecto.Cell):
|
|||
params.declare("t_srs", 'Target SRS', None)
|
||||
params.declare("no_tiled", 'Do not tile tiff', False)
|
||||
params.declare("compress", 'Compression type', 'DEFLATE')
|
||||
params.declare("bigtiff", 'Make BigTIFF orthophoto', False)
|
||||
params.declare("verbose", 'print additional messages to console', False)
|
||||
|
||||
def declare_io(self, params, inputs, outputs):
|
||||
|
@ -102,13 +103,14 @@ class ODMOrthoPhotoCell(ecto.Cell):
|
|||
['LZW', 'DEFLATE'] else '',
|
||||
'epsg': georef.epsg,
|
||||
't_srs': self.params.t_srs or "EPSG:{0}".format(georef.epsg),
|
||||
'bigtiff': '-co BIGTIFF=YES ' if self.params.bigtiff else '',
|
||||
'png': tree.odm_orthophoto_file,
|
||||
'tiff': tree.odm_orthophoto_tif,
|
||||
'log': tree.odm_orthophoto_tif_log
|
||||
}
|
||||
|
||||
system.run('gdal_translate -a_ullr {ulx} {uly} {lrx} {lry} '
|
||||
'{tiled} '
|
||||
'{tiled} {bigtiff} '
|
||||
'-co COMPRESS={compress} '
|
||||
'{predictor} '
|
||||
'-co BLOCKXSIZE=512 '
|
||||
|
|
Ładowanie…
Reference in New Issue