[gdal-dev] Getting all known coordinate systems.

Even Rouault even.rouault at spatialys.com
Thu Jun 20 05:59:32 PDT 2019

On jeudi 20 juin 2019 05:46:45 CEST Franik wrote:
> I am updating to GDAL 3.0 (C# bindings).
> I need a list of all the supported coordinate systems in my application.
> In the older versions, I requested all the known coordinate systems by
> reading the csv files in the GDAL_DATA folder (pcs.csv, gcs.csv,...).
> In the the new version, the csv files have been replaced by the proj.db
> file. Does anyone know of a good way to get all the coordinate systems.
> Should I just try to read the proj.db file myself and extract all the
> records? Or is there some kind of method exposed for this?

There's a osr.GetCRSInfoListFromDatabase() method in the SWIG bindings 
(binding of OSRGetCRSInfoListFromDatabase()), but it is only exposed for the 
Python bindings currently. 

A new SWIG typemap should be written for the other binding languages, so that 
osr.GetCRSInfoListFromDatabase() can be used with them.


Spatialys - Geospatial professional services

More information about the gdal-dev mailing list