Forum

Author Topic: DEM palette TMS export  (Read 1101 times)

benj_G

  • Newbie
  • *
  • Posts: 24
    • View Profile
DEM palette TMS export
« on: November 24, 2022, 05:27:32 PM »
Hi,
in version 1.8.1.13915 if I have a DEM in
Code: [Select]
COMPD_CS["NAD83 / Alberta 3TM ref merid 114 W + GSD95",PROJCS["NAD83 / Alberta 3TM ref merid 114 W",GEOGCS["NAD83",DATUM["North American Datum 1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9102"]],AUTHORITY["EPSG","4269"]],PROJECTION["Transverse_Mercator",AUTHORITY["EPSG","9807"]],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3776"]],VERT_CS["NAD83 (EPSG::4269) to GSD95",VERT_DATUM["NAD83 (EPSG::4269) to GSD95",2005],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]]and i whant to export it to TMS palette color in global mercator style there is not problem.

but now in latest 1.8.4.14856 it told me "Error: Vertical datum out of range". We can't reproject on the fly anymore ?

my little code snippet
Code: [Select]
projectionDSM = Metashape.OrthoProjection()
projectionDSM.type = Metashape.OrthoProjection.Type.Planar
projectionDSM.crs = Metashape.CoordinateSystem('EPSG::3857')
# export DEM raster palette
if kwargs['formatOrthoTiles'] == "TMS" :
    task = Metashape.Tasks.ExportRaster()
    task.description = 'DSM'
    task.title = 'DSM'
    task.format = Metashape.RasterFormat.RasterFormatTMS
    task.image_format = Metashape.ImageFormat.ImageFormatPNG
    task.source_data = Metashape.DataSource.ElevationData
    task.raster_transform = Metashape.RasterTransformType.RasterTransformPalette
    task.projection = projectionDSM
    task.global_profile = True
    task.save_alpha = True
    task.white_background = False
    task.path = pathDemExport
    tasks.append(task)

Thanks in advance for any help

Edit: if I export in tif with 3857 it's ok.
Edit2: same problem in GUI
« Last Edit: November 24, 2022, 05:49:35 PM by benj_G »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: DEM palette TMS export
« Reply #1 on: November 24, 2022, 06:04:28 PM »
Hello benj_G,

Probably the geoid TIF file related to the vertical datum is missing? Or the initial referencing of the project data is incorrect (does not fit the area of geoid use).
Best regards,
Alexey Pasumansky,
Agisoft LLC

benj_G

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: DEM palette TMS export
« Reply #2 on: November 25, 2022, 10:37:12 AM »
Hi,
thanks for fast reply!
both of version of Metashape have GSD95 tif geoid file in install dir and definition ok (see screenshot attached).
the geoid is used and work when I export my DEM in CRS to TIF in 3857, the value of each pixel is on ellipsoid. So the geoid is readed.



Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: DEM palette TMS export
« Reply #3 on: November 25, 2022, 12:36:20 PM »
Hello benj_G,

Can you send the project copy to support@agisoft.com? It would be sufficient to provide only project.zip, chunk.zip, frame.zip and complete contents of project.files/0/0/elevation folder contents. Additionally please provide the geotif file withe geoid undulation information that you are using.
Best regards,
Alexey Pasumansky,
Agisoft LLC