kopia lustrzana https://github.com/OpenDroneMap/ODM
rodzic
4c60de5bed
commit
9a79f8ea0b
|
@ -345,9 +345,14 @@ def config():
|
|||
'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.')
|
||||
type=str,
|
||||
choices=['YES', 'NO','IF_NEEDED','IF_SAFER'],
|
||||
default='IF_SAFER',
|
||||
help='Control whether the created orthophoto is a BigTIFF or '
|
||||
'classic TIFF. BigTIFF is a variant for files larger than '
|
||||
'4GiB of data. Options are %(choices)s. See GDAL specs: '
|
||||
'https://www.gdal.org/frmt_gtiff.html for more info. '
|
||||
'\nDefault: %(default)s')
|
||||
|
||||
parser.add_argument('--zip-results',
|
||||
action='store_true',
|
||||
|
|
|
@ -13,7 +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("bigtiff", 'Make BigTIFF orthophoto', 'IF_SAFER')
|
||||
params.declare("verbose", 'print additional messages to console', False)
|
||||
|
||||
def declare_io(self, params, inputs, outputs):
|
||||
|
@ -103,14 +103,15 @@ 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 '',
|
||||
'bigtiff': self.params.bigtiff,
|
||||
'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} {bigtiff} '
|
||||
'{tiled} '
|
||||
'-co BIGTIFF={bigtiff} '
|
||||
'-co COMPRESS={compress} '
|
||||
'{predictor} '
|
||||
'-co BLOCKXSIZE=512 '
|
||||
|
|
Ładowanie…
Reference in New Issue