Hello folks,
i'm using a script to export DEM from a number of projects. It worked flawlessly for a few projects and in one project it produces an Exception. I'm running Metashape on 1.7.0 11736.
What could be the problem? Export works from the GUI.
utm_NRW = Metashape.CoordinateSystem("EPSG::25832")
projection = Metashape.OrthoProjection()
projection.crs = utm_NRW
chunk.exportRaster(
source_data=Metashape.ElevationData,
path="G:/THS-data/data-processing/1-6/out/data/dsm.tif",
projection=projection,
image_format=Metashape.ImageFormatTIFF,
resolution_x=0.01,
resolution_y=0.01,
white_background=False,
clip_to_boundary=False,
save_alpha=False,
save_scheme=True)
Log:
ExportRaster: clip_to_boundary = off, image_format = TIFF, path = G:/THS-data/data-processing/1-6/out/data/dsm.tif, projection = ETRS89 / UTM zone 32N, resolution_x = 0.01, resolution_y = 0.01, save_alpha =
off, save_scheme = on, source_data = Elevation, white_background = off
Traceback (most recent call last):
File "export-data.py", line 95, in <module>
exportDataFromProject(project_file.as_posix())
File "export-data.py", line 86, in exportDataFromProject
exportDataRaster(chunk, export_location,
File "export-data.py", line 48, in exportDataRaster
chunk.exportRaster(
Exception: Null elevation
DEM Details
Size 14,475 x 18,681
Coordinate system WGS 84 (EPSG::4326)
Reconstruction parameters
Source data Dense cloud
Interpolation Enabled
Processing time 1 minutes 50 seconds
Memory usage 365.99 MB
Software version 1.6.1.10009
File size 381.68 MB