pull/1355/head
Piero Toffanin 2021-10-12 14:19:32 -04:00
rodzic 5dc2e224ce
commit 7f198d90ec
3 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -111,14 +111,14 @@ class ODMDEMStage(types.ODM_Stage):
dem_geotiff_path = os.path.join(odm_dem_root, "{}.tif".format(product))
bounds_file_path = os.path.join(tree.odm_georeferencing, 'odm_georeferenced_model.bounds.gpkg')
if args.crop > 0:
if args.crop > 0 or args.boundary:
# Crop DEM
Cropper.crop(bounds_file_path, dem_geotiff_path, utils.get_dem_vars(args), keep_original=not args.optimize_disk_space)
if args.dem_euclidean_map:
unfilled_dem_path = io.related_file_path(dem_geotiff_path, postfix=".unfilled")
if args.crop > 0:
if args.crop > 0 or args.boundary:
# Crop unfilled DEM
Cropper.crop(bounds_file_path, unfilled_dem_path, utils.get_dem_vars(args), keep_original=not args.optimize_disk_space)

Wyświetl plik

@ -152,7 +152,7 @@ class ODMReport(types.ODM_Stage):
overlap_color_map = os.path.join(report_assets, "overlap_color_map.txt")
bounds_file_path = os.path.join(tree.odm_georeferencing, 'odm_georeferenced_model.bounds.gpkg')
if args.crop > 0 and os.path.isfile(bounds_file_path):
if (args.crop > 0 or args.boundary) and os.path.isfile(bounds_file_path):
Cropper.crop(bounds_file_path, diagram_tiff, get_orthophoto_vars(args), keep_original=False)
system.run("gdaldem color-relief \"{}\" \"{}\" \"{}\" -of PNG -alpha".format(diagram_tiff, overlap_color_map, diagram_png))

Wyświetl plik

@ -332,7 +332,7 @@ class ODMMergeStage(types.ODM_Stage):
if io.file_exists(dem_file):
# Crop
if args.crop > 0:
if args.crop > 0 or args.boundary:
Cropper.crop(merged_bounds_file, dem_file, dem_vars, keep_original=not args.optimize_disk_space)
log.ODM_INFO("Created %s" % dem_file)