Renamed --compute-cutline

pull/979/head
Piero Toffanin 2019-04-29 17:35:12 -04:00
rodzic 5a06291ac3
commit 80c6670a35
3 zmienionych plików z 28 dodań i 17 usunięć

Wyświetl plik

@ -253,15 +253,6 @@ def config():
'Use 0 to disable cropping. '
'Default: %(default)s'))
parser.add_argument('--compute-cutline',
action='store_true',
default=False,
help='Generates a polygon around the cropping area '
'that cuts the orthophoto around the edges of features. This polygon '
'can be useful for stitching seamless mosaics with multiple overlapping orthophotos. '
'Default: '
'%(default)s')
parser.add_argument('--pc-classify',
action='store_true',
default=False,
@ -433,6 +424,17 @@ def config():
help='Decimate the points before generating the DEM. 1 is no decimation (full quality). '
'100 decimates ~99%% of the points. Useful for speeding up '
'generation.\nDefault=%(default)s')
parser.add_argument('--dem-euclidean-map',
action='store_true',
default=False,
help='Computes an euclidean raster map for each DEM. '
'The map reports the distance from each cell to the nearest '
'NODATA value (before any nearest neighbor hole filling takes place). '
'This can be useful to isolate the areas that have been filled with '
'nearest neighbor interpolation. '
'Default: '
'%(default)s')
parser.add_argument('--orthophoto-resolution',
metavar='<float > 0.0>',
@ -465,6 +467,15 @@ def config():
'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('--orthophoto-cutline',
action='store_true',
default=False,
help='Generates a polygon around the cropping area '
'that cuts the orthophoto around the edges of features. This polygon '
'can be useful for stitching seamless mosaics with multiple overlapping orthophotos. '
'Default: '
'%(default)s')
parser.add_argument('--build-overviews',
action='store_true',
@ -537,8 +548,8 @@ def config():
log.ODM_WARNING('--skip-3dmodel is set, but so is --use-3dmesh. --use_3dmesh will be ignored.')
args.use_3dmesh = False
if args.compute_cutline and not args.crop:
log.ODM_WARNING("--compute-cutline is set, but --crop is not. --crop will be set to 0.01")
if args.orthophoto_cutline and not args.crop:
log.ODM_WARNING("--orthophoto-cutline is set, but --crop is not. --crop will be set to 0.01")
args.crop = 0.01
return args

Wyświetl plik

@ -193,7 +193,7 @@ def get_submodel_argv(args, submodels_path, submodel_name):
i = 1
project_path_found = False
project_name_added = False
compute_cutline_found = False
orthophoto_cutline_found = False
# TODO: what about GCP paths?
@ -214,9 +214,9 @@ def get_submodel_argv(args, submodels_path, submodel_name):
result.append(submodels_path)
project_path_found = True
i += 2
elif arg == '--compute-cutline':
elif arg == '--orthophoto-cutline':
result.append(arg)
compute_cutline_found = True
orthophoto_cutline_found = True
i += 1
elif arg == '--split':
i += 2
@ -237,8 +237,8 @@ def get_submodel_argv(args, submodels_path, submodel_name):
if not project_name_added:
result.append(submodel_name)
if not compute_cutline_found:
result.append("--compute-cutline")
if not orthophoto_cutline_found:
result.append("--orthophoto-cutline")
return result

Wyświetl plik

@ -111,7 +111,7 @@ class ODMOrthoPhotoStage(types.ODM_Stage):
# Cutline computation, before cropping
# We want to use the full orthophoto, not the cropped one.
if args.compute_cutline:
if args.orthophoto_cutline:
compute_cutline(tree.odm_orthophoto_tif,
bounds_file_path,
os.path.join(tree.odm_orthophoto, "cutline.gpkg"),