Skip to content
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

cs2cs /cct don't transform height in ETRS89 (EVRF2007) to DHHN2016 #3194

Closed
ecr334 opened this issue May 12, 2022 · 5 comments
Closed

cs2cs /cct don't transform height in ETRS89 (EVRF2007) to DHHN2016 #3194

ecr334 opened this issue May 12, 2022 · 5 comments
Assignees

Comments

@ecr334
Copy link

ecr334 commented May 12, 2022

cs2cs don't transform height in ETRS89 (EVRF2007) to DHHN2016

network = on

cs2cs EPSG:4258 EPSG:7837
51.495833333 14.30625 41.8100
51.50	14.31 41.81

cs2cs EPSG:4258+5621 EPSG:4258+7837
51.495833333 14.30625 41.810
51.50	14.31 41.81

and cct:

cct +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +inv +proj=vgridshift +grids=GCG2016.tif +multiplier=1 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1

information on steps taken from projinfo

 projinfo -s EPSG:4258 -t EPSG:7837

Expected Output

Снимок экрана 2022-05-12 в 16 14 12

Environment Information

  • PROJ version 9.0.0
  • macOS / windows11

Installation method

  • homebrew/OSGeo4W
@ecr334 ecr334 added the bug label May 12, 2022
@rouault
Copy link
Member

rouault commented May 12, 2022

The issue here is that the needed data file GCG2016.txt doesn't seem to be available under free & open data licensing, if I trust
https://mis.bkg.bund.de/trefferanzeige?docuuid=983fac52-b7de-4f43-a6f5-91e007a6f963
Unless someone manages to make BKG change their mind about that, there's little we can do

@ecr334
Copy link
Author

ecr334 commented May 12, 2022

I have a test quasigeoid gcg2016 but the conversion does not work with it either
https://gdz.bkg.bund.de/index.php/default/quasigeoid-der-bundesrepublik-deutschland-quasigeoid.html

@rouault
Copy link
Member

rouault commented May 12, 2022

I have a test quasigeoid gcg2016 but the conversion does not work with it either

how did you get the GeoTIFF file ? Did you generate it yourself ?
What does "gdallocationinfo -wgs84 GCG2016.tif 14.30625 51.495833333" return (you need GDAL installed)

@ecr334
Copy link
Author

ecr334 commented May 13, 2022

I downloaded the demo at the link:
https://sg.geodatenzentrum.de/web_public/gdz/testdaten/quasigeoid.zip
and copied the file GCG2016.tif to /usr/local/share/proj

~ % gdallocationinfo -wgs84 GCG2016.tif 14.30625 51.495833333
ERROR 4: GCG2016.tif: No such file or directory

but if you change the path to the .tif file:

 ~ % gdallocationinfo -wgs84 /Users/fedot/Downloads/GCG2016.tif 14.30625 51.495833333 
Report:
  Location: (0P,0L)
  Band 1:
    Value: 41.810001373291

@rouault
Copy link
Member

rouault commented May 13, 2022

Works for me with cct:

$ echo 51.495833333 14.30625 0 | cct +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +inv +proj=vgridshift +grids=quasigeoid/Gebiet_LAUSITZ/quasigeoid/linux/geotiff/GCG2016_tglausitz.tif +multiplier=1 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
51.4958333330 14.3062500000 -41.8100 inf

The fact that it doesn't work with cs2cs out of the box is expected given that PROJ doesn't provide this grid and thus doesn't not alias the name of the grid provided by EPSG : GCG2016.txt
You'll have to insert an entry in the grid_alternatives table of proj.db. Cf https://github.com/OSGeo/PROJ/blob/master/data/sql/grid_alternatives.sql

But that won't probably help you much for EVRF2007 to DHHN2016, as there's no known transformation in EPSG from EVRF2007 to ETRS89 ellipsoidal height.
EPSG has a "DHHN2016 height to EVRF2007 height" ( https://epsg.org/transformation_7838/DHHN2016-height-to-EVRF2007-height-1.html ) parametric transformation, but this transformation method (Vertical Offset and slope) is not currently implemented in PROJ

@rouault rouault self-assigned this May 14, 2022
rouault added a commit to rouault/PROJ that referenced this issue May 14, 2022
rouault added a commit to rouault/PROJ that referenced this issue May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants