9

In the ogr2ogr documentation it says that when using -a_srs srs_def:

Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT definition.

Where are the default well-known definitions listed? Do they include ESRI as well as EPSG? If not, why not, and can I add all the ESRI definitions listed at spatialreference.org? Is there an easy way to load an srs definition using an SRID from a PostGIS spatial_ref_sys table, aside from just running some sql to get the text?

Thanks!

BenjaminGolder
  • 1,793
  • 4
  • 20
  • 31

2 Answers2

11

I would note that if you have curl support in your GDAL build (a very common configuration), you can simply give the spatialreference.org URL for the SRS and it will fetch what it needs and dereference it appropriately.

-a_srs http://spatialreference.org/ref/epsg/4326/ -t_srs http://spatialreference.org/ref/epsg/26915
Brad Koch
  • 475
  • 5
  • 23
Howard Butler
  • 4,013
  • 22
  • 26
  • Note, spatialreference.org is very precise with urls, need to end with slash; http://spatialreference.org/ref/epsg/4326// works, http://spatialreference.org/ref/epsg/4326 wouldnt – kakoni May 10 '15 at 17:06
9

Well known definitions are in the gdal/data directory. You can browse the current directory source online: http://trac.osgeo.org/gdal/browser/trunk/gdal/data. Look at the gcs.csv and pcs.csv files.

Sasa Ivetic
  • 5,190
  • 23
  • 22