0

I have been using Pyproj for some time now doing only simple projection and transformation. I am totally new to vertical datum and differences in GEOID among Coordinate systems. I have been trying to do vertical transformation using pyproj but I feel like I am missing something. For example I tried this :

import pyproj
lat = 43.70012234
lng = -79.41629234
z = 100
wgs84 = pyproj.Proj("+init=EPSG:4326")
NAD83NDV88 = pyproj.Proj("+init=EPSG:5498")
results = pyproj.transform(wgs84, NAD83NDV88, lng, lat, z)

which returns : (43.70012234, -79.41629234, 100.0).

My logic was to take a WGS84 coordinate with an ellipsoid elevation and try to convert that into NAD83 NADV88 (epsg:5498). But it seems like it is not that simple.

I found some EPSG codes for transformation related to this question like : EPSG:3858 +> WGS 84 to EGM2008 height (1) but I haven't been able to figure out how to use those codes in Pyproj. I am missing some pieces of the puzzle!

So to summarize can this be done?

  • Not that it answers your question but according to the UNAVCO geoid height calculator the geoid height is -37.32 meters below the ellipsoid height at your coordinates. Maybe this link will help you troubleshoot your issue when you get your code sorted out. unavco.org/software/geodetic-utilities/geoid-height-calculator/… – GBG Oct 31 '19 at 21:10
  • Thank you for the link it sure does help! – User18981898198119 Nov 1 '19 at 18:49
1

There is two way to solve your problem:

1st you can try to use the EPSG code for the EGM2008 height with pyproj which is EPSG:3855 (instead of the NAD83 datum that you are trying to use because it is a horizontal datum and not a vertical datum)

2nd you use PROJ6 instead of pyproj (pyproj is the python library from proj) You need to use the proj transformation "Vertical grid shift" The documentation is here: Vgridshift

The geoid grid for EGM2008 should already be in proj with the name "egm08_25.gtx" (I found it here egmgrid)

the proj line will look like: echo lat lng z | proj +proj=vgridshift +grids=egm08_25.gtx

In python you can launch the command line with os.system or subprocess.Popen

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.