0

I would like to transform WGS84 UTM Zone 35N coordinates to ED50UTM Zone 35N coordinates with a grid shift file (.gsb file I have) in python using pyproj. I tried below code but it gives failed to load datum shift file error (code is in latlong, I also dont know how convert utm coordinates). Could you please help me?

import pyproj

ed50 = pyproj.Proj(proj=latlong +nadgrids='wgs84_ed50.gsb')

wgs84 = pyproj.Proj("EPSG:4326")

a, b = pyproj.transform(wgs84, ed50, 10, 20)

print(a,b)

Thanks in advance

6
  • Did you put the grid file in the PROJ data directory?
    – snowman2
    Apr 4, 2020 at 14:16
  • Thanks for the reply. I put the grid file in the directory where my python code is in.
    – ayaz alp
    Apr 4, 2020 at 14:20
  • No idea what the PROJ data directory is
    – ayaz alp
    Apr 4, 2020 at 14:50
  • This should help: pyproj4.github.io/pyproj/stable/api/…
    – snowman2
    Apr 4, 2020 at 18:03
  • @snowman2, I put the grid file in the proj data directory (egm96_15.gtx was there, too). But, still giving error. Could you please give me the exact working python code. Thanks for your help in advance
    – ayaz alp
    Apr 6, 2020 at 3:34

0

Your Answer

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

Browse other questions tagged or ask your own question.