-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDAL 3.0.1: coordinate transformations are inconsistent for different CRS types #1972
Comments
Yes this is a complicated topic, furthermore complicated by the fact that PROJ 6.x/7dev is still in development/tuning in that area. The fact that "gdaltransform -s_srs EPSG:4979 -t_srs EPSG:2189" causes a change in height is a PROJ bug. The datum shift applied is "Azores Central 1948 to WGS 84 (1)" EPSG:1886. The method for it is "Geocentric translations (geog2D domain)", so PROJ is wrongly extending it into the 3D domain, but it shouldn't alter the Z value since this tranformation isn't intended for that (at least, as much as I understand the EPSG guidance notes). Can you file a ticket in PROJ github tracker about that one ? The fact that you specify 3D systems as input and output doesn't necessarily mean that PROJ can and will transform the Z value. For that it must find a transformation in its database. If it doesn't find one, then it will leave the Z untouched. It can also not be able to do horizontal datum transform if it has not the available data. If you want to have a deeper understanding of what is going on when investigating a transformation, I suggest you use the Regarding EPSG:4979 to EPSG:4985 (WGS72 3D), the available transformation in EPSG is EPSG:1237 which is a "Position Vector transformation (geog2D domain)", so valid for 2D only. It is expected that using PROJ strings and EPSG code doesn't always lead to the same results. PROJ strings are a lossy way of encoding a CRS as now stated in https://gdal.org/doxygen/classOGRSpatialReference.html#a271b3de4caf844135b0c61e634860f2b The fact of adding +vunits=m in |
…rt geog2D transformation to a geog3D Fixes for example EPSG:4979 to EPSG:2189, as raised in OSGeo/gdal#1972 (comment)
No longer needed. Fixed in PROJ per OSGeo/PROJ#1711 |
…rt geog2D transformation to a geog3D Fixes for example EPSG:4979 to EPSG:2189, as raised in OSGeo/gdal#1972 (comment)
Hello, Thank you for your help! Regarding to your answer, please, correct me if i'm wrong:
But there are some features that i was able to use only with
Is there any workaround for this cases? Can i define geoid file for CRS using |
Yes
If the vertical CRS is known and there is a transformation in the EPSG dataset, then it will be used
In PROJ master, the capability to add a GEOIDMODEL in WKT has been added per OSGeo/PROJ#1710. It was also possible to use the BOUNDCRS mechanism that gives a transformation between a VertCRS and a GeographicCRS using a grid. e.g.
|
Yes, you are right, it works out of box with
Will it supported via
Should it be added manually or there is some functionality for this purpose? I didn't found any |
Good question. Honestly this topic of custom grids is a non-trivial one when using a pure WKT based approach like PROJ does now, so we're a bit on the experiment edge for now I think. |
Ok, thank you, i am looking forward to new updates! |
Closing as I think the discussion solved the issue |
Expected behavior and actual behavior.
Hello,
I'm sorry to disturb you again, but there is something that I just can't understand with GDAL coordinate transformations.
I tried to force
GDAL 3
to transform height for any system. It's important for us to make behaviour predictable in all cases and we hope you can make it a little more clear for us and other developers adoptingGDAL 3
.All the tests have been performed using
GDAL 3.0.1
andProj4 6.2.0
:I divided the tests into several cases:
1. 3D -> 3D
EPSG:4979
->IGNF:RGNCGEO
Transform CRSs from registry:
Then get
proj
description of this CRS and try define target coordinate system with it:Height wasn't transformed, and second coordinate differs from example above. Let's add
towgs84=0,0,0
:Now second coordinate was transformed correctly, but height still wasn't. Then add
vunits=m
toproj
string:What are my conclusions based on this test?
3D -> 3D
change in height above the datum is taken into accountproj4
string doesn't completely describe CRS unlike WKT. Transformations using CRS from registry and fromproj4
string may be different, is it correct?+towgs84
params are not specified, it would be more correct to set it to default value+towgs84=0,0,0
proj4
string it's necessary to specify+towgs84
and+vunits
params GDAL 3.0.1: coordinate vertical transformation without geoid #1946 (comment)Ok, next case.
EPSG:4979
->EPSG:4985
The same flow as above:
For some reason height wasn't transformed even if target CRS is defined from registry.
Now use
proj
string to force height transform:Here still
3D -> 3D
transformation, but change in height above the datum is NOT taken into account, until it isn't forced by+vunits
inproj4
string.Is this behaviour expected?
2. 3D -> 2D
EPSG:4979
->EPSG:4475
Here all works as expected:
Conclusions:
+vunits
inproj4
string3. 3D -> PROJCS
EPSG:4979
->EPSG:2189
The most unclear case, first try to use CRS from registry:
Height is transformed despite the fact that target CRS is horizontal. Try to use
proj
string:As expected height isn't transformed because
vunits
isn't specifiedBut after adding
vunits
height still isn't transformed!Conclusions:
3D -> PROJCS
transforms height. But why ifPROJCS
is horizontal CRS?+towgs84
and+vunits
doesn't force height transformation forPROJCS
. How can i force height transformation for projected CRS?I didn't find any reasonable explanations for such differences in behaviour for different CRS types. Am I approaching this correctly or I should be looking for a different workflow in general?
My questions
proj4
string). Is this behaviour correct?1.2
(EPSG:4979
->EPSG:4985
) the height doesn't get transformed even when converting coordinates between two 3D systems from the registry. Is there a reason for this?3D -> PROJCS
transformation transforms height despitePROJCS
being a horizontal CRS.+towgs84
and+vunits
toproj4
description of CRS doesn't force height transformation forPROJCS
. How can I force height transformation for projected CRS?towgs84=0,0,0
if they aren't specified? Will it affect transformation?I will be happy to create a guide for coordinate transformations with
GDAL >= 3
to help other developers with the same sort of questions, but I don't understand this enough yet. Would you be interested in this?Thank you!
Operating system
macOS Catalina 10.15
GDAL version and provenance
GDAL 3.0.1, PROJ 6.2.0
The text was updated successfully, but these errors were encountered: