GDAL Python – Determine the PROJ Version Used

gdalprojpython

As PROJ recent major update introduces importants change in the API, I need in my script to check what is the PROJ version compiled with the current GDAL installation of the user. I know I can get the GDAL version with osgeo.gdal.VersionInfo() but it does not tell me what is the PROJ version.

Any suggestions?

Best Answer

This way:

>>> from osgeo import osr
>>> osr.GetPROJVersionMajor()
6
>>> osr.GetPROJVersionMinor()
2
Related Question