Forum

Author Topic: [SOLVED] Wrong heights when exporting DEM as grid  (Read 2828 times)

Liesenfeld-Vermessung

  • Newbie
  • *
  • Posts: 12
    • View Profile
[SOLVED] Wrong heights when exporting DEM as grid
« on: July 09, 2020, 05:32:19 PM »
Hello everybody,

i already contacted the support (ticket number #140682) a week ago, but until now, i got no answer. Maybe someone here can help.

After a drone flight I created a DEM in Metashape 1.6.3. The GCPs have a standard deviation of 8mm. Everything seems to fit as usual.
Now I should export points for a customer in a 5m grid and import them into a CAD drawing.
So, as usual, I first defined outer and inner boundaries and then exported the DEM in a 5m grid as an XYZ file.

After reading the points in our CAD (BricsCAD 2020), I examined the points for errors (outliners). In a very flat area at a parking lot e.g.
I noticed a height difference of over a meter to a neighboring point. There should be a maximum of 4-5cm height difference. So I wrote down the coordinate (X and Y value)
and created a point in Metashape at exactly that point. In the DEM view, I zoomed extremely close to that point and manually measured the height directly at the point with the ruler symbol.
The correct height is now shown to me there. This differs from the exported height by over one meter (see screenshot CAD.png in the "Exported" folder)!
I had created the DEM from depth maps. As a test, I duplicated the chunk in the next step and now generated a dense point cloud to generate a DEM from it.
At the same point there was now a height difference of 24cm (between the two DEMs). The values ​​should be more or less the same, right?
Then I installed the old version of Metashape (v.1.5.5) to test whether the error also occurs here.
I completely reoriented all the images, re-measured the GCPs, created a dense point cloud and created a DEM from it. The problem also exists here. The height at the same point fits
slightly better to the neighboring points, but there is a difference between the exported point and the manually measured point of over 50cm!

I have uploaded both projects (Metashape 1.5.5 and 1.6.3) including the photos, the GCPs and some screenshots in a ZIP archive here (approx. 13GB):

https://drive.google.com/file/d/1YgNK3CsTgLFUfvKY42pc_3WnngDxF5t8/view?usp=sharing

I know that 5 GCPs is not very much, but the terrain is extremely flat and the measured control points also fit very well. Otherwise I get very good results with this measurement constellation!

UPDATE1:

After further investigation, it seems that Metashapes heights are internally correct. But when exporting the DEM as XYZ-file in EPSG 25832 (maybe others too), the points seems to have (very) wrong heights! Here is a comparison of the contourlines and the exported points:

https://ibb.co/s6GkhRt

UPDATE2:
I've spend some more time with testing and i figured out, that the problem seems to be the chosen grid size of 5m. When i choose a smaller grid size like for example 4m or 2m the "spike" on the example point isn't there anymore!

UPDATE3:
The support gave me an answer and it seems that all heights are simply averaged in a 5m x 5m grid. Of course that's not what I want and in my opinion that's wrong and very dangerous. I just want to output points in a 5m x 5m grid without averaging anything, i.e. pure measured values!

It seems that the heights are calculated in the way shown in this pucture: https://imgur.com/8Cfs4sK

UPDATE4:
Hmm, if the heights are calculated in the way shown in the upper screenshot, the edge shouldn't be a problem because i've defined the building as an inner border. That means it should be completly ignored. Everything else should be flat (see the mesh, for example).
Here is the screenshot to show the borders: https://imgur.com/MBhRQyo

UPDATE5:
Answer from Agisoft:
Thank you for your feedback. I will pass your recommendations to the developers.
At the moment, features export only one value from 5x5 pixel window - no, only averaging in the window. And Inner boundaries will work well if the detail of the exported dem is higher than the distance from the borders to limited objects, so you need to export in a higher resolution so that the building doesn't affect the parking heights.

UPDATE6:
Ok, then i hope that the developers will add a checkbox in a future update, to prevent averaging the heights and to export real measured values instead.

Regards
Thomas
« Last Edit: July 16, 2020, 06:50:29 AM by Liesenfeld-Vermessung »

Liesenfeld-Vermessung

  • Newbie
  • *
  • Posts: 12
    • View Profile
[SOLVED] Wrong heights when exporting DEM as grid
« Reply #1 on: July 16, 2020, 06:49:59 AM »
The problem presists, but for the moment, i can export a very small grid and have to delete all unwanted heights.