[gdal-dev] Get list of all available SRS

Frank Warmerdam warmerdam at pobox.com
Thu Sep 20 19:49:23 PDT 2012


On 12-09-20 07:11 PM, Nik Sands wrote:
> Is there a way to get a list (eg, array) of all Spatial Reference Systems currently available to GDAL (eg, all those defined in files in GDAL_DATA directory)?
>
> In my GUI application, I'd like to be able to present my users with a list of SRS to choose from, but I'm not sure how to generate such a list.

Nik,

GDAL does not provide any services to get the SRS list but you can
access the gdal/data/pcs.csv and gdal/data/gcs.csv files yourself
fairly easily to get the names and EPSG identifiers.  What this does
not help with is a logical organization of the SRSes which can be
helpful in a GUI since there are a lot.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://home.gdal.org/warmerda
and watch the world go round - Rush    | Geospatial Software Developer



More information about the gdal-dev mailing list