Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: ppant on August 11, 2022, 12:15:16 AM

Title: Metashape cesium viewer float in the air
Post by: ppant on August 11, 2022, 12:15:16 AM
I generate the Dense point cloud and export it in the correct projection. Then generated the 3D tiles using entwine. Now my point cloud are hanging in the air. Around 30-40 m above. not even close to the ground. Where is the problem not sure how to correct those Z offsets.
Title: Re: Metashape cesium viewer float in the air
Post by: Paulo on August 11, 2022, 02:19:31 PM
Hello ppant,

in what area is your project situated? This could be a vertical reference issue. That is, your are exporting the DC with ellipsoid height and Cesium expects ortho height (MSL) or vice versa. In some areas of the world difference between ellipsoidal and orthometric height can easily be in the 30-40 m range....
Title: Re: Metashape cesium viewer float in the air
Post by: ppant on August 11, 2022, 07:06:31 PM
Thanks, Paulo for the response. The data is in US. Could you shed light on how I export the data in orthometric height from metashape other than ellipsoid? I would like to do that via a script. at the moment I am doing
Code: [Select]
proj_crs = Metashape.OrthoProjection()
proj_crs.crs = Metashape.CoordinateSystem(input_coordinate)
   
and pass this projection when exporting the pointcloud. My input coordinate is UTM EPSG. code. 
Title: Re: Metashape cesium viewer float in the air
Post by: Paulo on August 11, 2022, 07:40:49 PM
Ppant,

What are u exporting?
If dense cloud, then during export using chunk.exportPoints() method you must specify crs with crs = CordinateSystem see p.35 of API reference manual.

you could define crs as following:
Code: [Select]
output_crs = Metashape.CoordinateSystem("EPSG::9518")and then
Code: [Select]
chunk.exportPoints(...., crs = output_crs, ...)[/code]

where EPSG code 9518 is WGS84 + EGM2008 height or you use any compound CS with geoid height..
Title: Re: Metashape cesium viewer float in the air
Post by: ppant on August 11, 2022, 08:35:14 PM
Thanks, Paulo This is helpful.

Yes, I am exporting the Dense point cloud into UTM coordinate such that I could use another algorithm to extract distance information from the point cloud.  I was wondering if there is a way to export point cloud in UTM with the correct orthometric height.

Thanks
Title: Re: Metashape cesium viewer float in the air
Post by: Paulo on August 11, 2022, 09:09:34 PM
you can just follow following https://agisoft.freshdesk.com/support/solutions/articles/31000148332-how-to-use-height-above-geoid-for-the-coordinate-system to create your compound CS with geoid height