I am trying to correct ellipsoid heights to orthometric height, transforming from WGS84 to EGM2008 using the EPSG code 3855. I have tried with pyroj, as in this question:
import pyproj EGM2008height = pyproj.Proj("EPSG:3855") wgs84_ll = pyproj.Proj("EPSG:4326") print(pyproj.transform(wgs84_ll, EGM2008height, 34.68016909181368, 38.31245226053967,100))
which returns the error:
(Internal Proj Error: proj_create: unrecognized format / unknown name)
I understand that I need the egm08_25.gtx file, which I have downloaded but I don't know how to use it so with pyproj. Is there a way to add EPSG codes to pyproj?
I can get it to work by looping over my data and using gdaltransform by calling the command:
cmd = 'echo ' + '"' + str(X[i]) + ' ' + str(Y[i]) + ' ' + str(Z[i]) + '"' + ' | gdaltransform -s_srs "+proj=longlat +datum=WGS84 +no_def" -t_srs "+proj=longlat +datum=WGS84 +no_defs +geoidgrids=/Usegm08_25.gtx"'
But this is a slow process and I think using pyproj will be more efficient.
There are several questions on this already, but none of them comprehensively show how to use the .gtx file or add EPSG codes into pyproj.
Related Qs where I think the answe requires reviewing: