[gdal-dev] Get specific parameter in CRS information with Python gdal

Ramiro Marco Figuera r.marcofiguera at jacobs-university.de
Tue Oct 18 02:38:08 PDT 2016


I have a tif image containing its CRS. I would like to extract the 
parameter "central_meridian". I have the following piece of code:

from osgeo import gdal,osr
print prj

print srs.GetAttrValue('PARAMETER',0)
print srs.GetAttrValue('PARAMETER',1)

The output I get is the following: 

latitude_of_origin 90

The code is fetching the first parameter: latitude_of_origin 90 but i 
would like to get the second one "central_meridian" but i don't know how 
to do it? Any ideas?

Thanks a lot.

Ramiro Marco Figuera
Research Associate - PhD Student
Department of Physics and Earth Sciences
Jacobs University Bremen
Campus Ring 1, 28759 Bremen, Germany
Office: Research III, Room 99b
Tel: +49 (0)421 200 3226

More information about the gdal-dev mailing list