Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: flyzk on January 30, 2021, 09:30:24 AM

Title: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 09:30:24 AM
hey,

I use 1.7.1, and I meet issues since 1.7.0 : I always get "Vertical Datum out of range".

I use local GEOID for markers and project. My pictures are in WGS 84. Project and marker : RGR92 + Geoid RAR07
I'm able to align/optimize/build dense cloud.
But when I try to: create DEM with this coordinate system I get the error. If I build the DEM in another system it works, but when I want to export with this coordinate system I get same error.


Do you think I get this error because negativ value?
Is there any fix?
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 09:57:04 AM
an option to select point by altitude (range) could be usefull to fix this issue or be able to set Z minimum when building DEM.
Title: Re: Vertical Datum out of range 1.7.1
Post by: Alexey Pasumansky on January 30, 2021, 02:22:18 PM
Hello flyzk,

"Vertical Datum out of range" error means that there are some elements in the Reference pane (cameras or markers) which have source coordinate values outside the vertical datum area of use.
It could happen, if the coordinate values of the cameras remain in WGS84 (Lat/Long format in degrees), but the system for cameras is selected as  ESPG 2975 + GEOID RAR07. Also it could happen, if some coordinates are just totally incorrect (for example, all zeros).
Title: Re: Vertical Datum out of range 1.7.1
Post by: Paulo on January 30, 2021, 04:30:10 PM
Hi flyzk,

I was able to extract some points from world wide ASTER DEM and save as LAZ in RGR92 + Geoid RAR07. It imports into MS with no problem... as well as DEM. see attached files..

Update: however if I ty to create a DEM from imported LAZ, I do get same error
Quote
Vertical Datum Out of Range
see 2nd screencapture...
So you are right there is a problem here
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 05:19:08 PM
Hi guys,
Thanks for help.
Thanks Paul, I've spent a lot of time trying many solutions.. The problem appears for me when Building DEM with this coordinate system or when trying to export a DEM with this coordinate system.
I get some negativ Z value into my .LAS.
Alexey, I've tried to convert my pictures into this coordinate system.
Everything has the same now (picture/project/marker) no one is out of range, and it still doesn't work.
Title: Re: Vertical Datum out of range 1.7.1
Post by: Alexey Pasumansky on January 30, 2021, 07:09:30 PM
Hello flyzk,

Please send the project file with the alignment results (cameras, markers, tie points) to support@agisoft.com and also the GeoTIFF file that you are using for the geoid utilized in the project.
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 07:48:58 PM
Hey,

Thanks for following my case.

I've did some tries:
-export .LAS with this GEOID works
-export mesh in .PLY with this GEOID works
-building DEM from Tie point with this GEOID : works
-building DEM from Point Cloud with this GEOID: doesn't work
-exporting DEM (built in another GEOID) in this GEOID: doesn't work

I've send you a wetransfer with datas you've asked.
Let me know
Title: Re: Vertical Datum out of range 1.7.1
Post by: Alexey Pasumansky on January 30, 2021, 09:25:51 PM
Hello flyzk,

Thank you for sharing the project data.

The problem is related to some internal algorithmic specifics. When the dense cloud is used for the mesh generation, the coordinates of the higher level hierarchical tiles are used and they appear to be outside the geoid area.

The workarounds that I see for this case are the following:
- generate the mesh from the dense cloud and then build DEM based on the mesh (with the interpolation disabled), probably tiled model will also work for this approach.
- expand the geoid file by extrapolating the no-data area (at least by 10-15 km from the area of use) and utilize the modified file as geoid.

Unfortunately, I don't think it could de fix quickly on our side, as it requires to modify the entire procedure of interaction with the geoid data, which would be time consuming and should be modified carefully, as something else could be affected.
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 09:37:21 PM
Hey Alexey,
thanks for this answer.

If I understand well, I can either create a DEM without using Point Cloud (which is not possible in my case, since I need to filtering many things before like water), or expand the geoid file?
I think I have to expend the Geoid file.
About expending the geoid file, can you explain how can I do that? Can I use Agisoft for this task? the only field where I see  "No data value" is when I've already built a DEM (in another Coordinate system) and I try to export it then I can see this value: -32767, can I change something there?
thanks

Edit: I can also see this field when I import GEOID and the same data is fill: -32768
Title: Re: Vertical Datum out of range 1.7.1
Post by: Paulo on January 30, 2021, 10:08:05 PM
Hi flyzk,

I created a new Geoid  file for La Reunion that covers a little bigger area than original from ISG. Try it to see if you can use it and create DEM without problem.

Hope it can work,
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 10:16:59 PM
Thanks Paulo for the help,

When I change my marker + my project coordinate system for the new one, yes I'm able to create DEM & to export it  but I also lost 10cm accuracy into my checkpoint/gcps unfortunatly

It seems I will have to create DEM using another soft and them import it again to perform the orthophoto :-(
Title: Re: Vertical Datum out of range 1.7.1
Post by: Paulo on January 30, 2021, 10:48:27 PM
Flyzk,

the dems inside common area are practically equal as you can see in attached screen copy where original tif is shown in grey scale and expanded in color. As seen in profile, the difference between the 2 does not exceed a few cm. So 10 cm seems to come from other source. Did  you download the RAR07 geoid from  https://www.isgeoid.polimi.it/Geoid/Africa/ReunionIsland/Reunion07_g.html ? This is whre I got mine....
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 11:08:40 PM
Yes this is the same
Title: Re: Vertical Datum out of range 1.7.1
Post by: Paulo on January 30, 2021, 11:26:15 PM
Your tif is exacltly the same as the one I downloaded from ISGeoid, as seen from difference grid equal to 0....

If you have the coordinates of a few of your checkpoins, I could check the undulation difference between original and expanded tif at these points and confirm if your Z error comes from this difference...
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 11:30:36 PM
Thanks for your help Paulo!

East North Alti
321294.397 7681606.334 11.304
321372.135 7683392.457 8.955
321179.878 7682426.914 2.417
321360.926 7683811.359 3.321
Title: Re: Vertical Datum out of range 1.7.1
Post by: flyzk on January 30, 2021, 11:34:12 PM
Maybe the problem come from another source: I've changed both my Marker and project that was in the old custom GEOID by the new one. Maybe I should only change the project coordinate system without changing the marker and then create DEM?
Title: Re: Vertical Datum out of range 1.7.1
Post by: Paulo on January 31, 2021, 12:11:38 AM
The difference in geoid height at these 4 points is maximum 4 mm. So 10 cm error does not come from this expanded geoid

Code: [Select]
ID X Y Z RAR07 fr ign RAR07 Geoid_Diff
1 321294.397 7681606.334 11.304 3.501 3.502 -0.001
2 321372.135 7683392.457 8.955 3.246 3.250 -0.004
3 321179.878 7682426.914 2.417 3.369 3.373 -0.004
4 321360.926 7683811.359 3.321 3.181 3.184 -0.003
Title: Re: Vertical Datum out of range 1.7.1
Post by: Alexandre Demers-Potvin on March 18, 2021, 03:14:19 AM
Hi, everyone,

I've encountered similar challenges when I tried to export a 3D model from Metashape 1.7 in .kmz format. No matter which geographical and vertical CS I used, the vertical datum was always out of range. I made sure I always used the same CS for markers and cameras at every attempt, but it just didn't work. I followed Alexei's advice and got the following results.

1. Disable interpolation for mesh building: didn't work
2. Expand geoid: didn't work. I noticed that it is possible to edit the No Data area in the 'import geoid' pane, but this edit doesn't appear to get saved, no matter which geoid I import. I tried to edit that in the 'ToWGS84' pane too, but it didn't work either. I tried the EGM 96, NAVD88 and CGVD2013 to no avail.

Disclaimer: the only reference data for my model consists in a single georeferenced camera plus 2 control points I placed manually by estimating their position from Google Earth. Maybe my reference data just isn't precise or accurate enough for now.

Here are the coordinates of my reference data just in case:

Type               Longitude            Latitude           Altitude(m)         Altitude error(m)
Camera          -111.394094         50.759816        695.059504          1.399042
Marker           -111.394115         50.760669         668.559534          0.000001
Marker           -111.393617         50.760367         670.559513          -0.000001

Thanks,
Alexandre Demers-Potvin

Title: Re: Vertical Datum out of range 1.7.1
Post by: Alexey Pasumansky on March 21, 2021, 07:50:24 PM
Hello Alexandre,

Do you observe the problem in 1.7.2 version as well?
Title: Re: Vertical Datum out of range 1.7.1
Post by: wizprod on April 03, 2021, 01:26:36 AM
I am also having this problem a lot! Usually happens at some point after converting Cameras to another datum. And especially prone to happen if Markers and Cameras are not converted at the same time, or you use the Update from Exif, resulting in a Datum mismatch between Markers and Cameras.

And the real mess is that there seem to be no remedy other than do the project again from scratch :(

Also occuring in 1.7.2.