wiki:FAQCoordinateSystemsAndProjections

Version 9 (modified by Mateusz Łoskot, 12 years ago) ( diff )

Linked wfs-dev thread

FAQ - Coordinate Systems and Projections

  1. What are Well Known Text projections, and how do I use them?
  2. What Axis Order is used in GDAL/OGR?
  3. Can I reproject rasters with GDAL?
  4. Why doesn't GDAL automatically choose the datum transformation?
  5. Does GDAL/OGR use the PROJ.4 EPSG init file (/usr/share/proj/epsg) ?

What are Well Known Text projections, and how do I use them?

OpenGIS Well Known Text is a textual format for defining coordinate systems. It is loosely based on the EPSG coordinate systems model. While GDAL itself just passes these definitions around as text strings, there is also an OGRSpatialReference class in gdal/ogr for manipulating them and a linkage to PROJ.4 for transforming between coordinate systems. The OGRSpatialReference, and PROJ.4 linkaged (but not PROJ.4 itself) is linked into the GDAL shared library by default. More documentation on WKT and OGRSpatialReference can be found in the OGR Projections Tutorial.

What Axis Order is used in GDAL/OGR?

Check RFC 20: OGRSpatialReference Axis Support to learn details of axis order implementation used by GDAL/OGR.

For general discussion about the issue, dive into compiled the Axis Order Confusion article compiled by [arnulf.us/ Arnulf Christl] with great help from the OSGeo Community.

Often, OGR GML driver users are confused about the order of coordinates included in GML documents. If this is your case too, you may find helpful the Axis Ordering in GML thread in OGC WFS mailing archives.

Can I reproject rasters with GDAL?

Yes, you can use the gdalwarp utility program or programmatically use the GDALWarpOperation class described in the GDAL Warp API Tutorial.

Why doesn't GDAL automatically choose the datum transformation?

There is no such thing as an accurate "default" set of datum transformation parameters for a datum. OGR uses (NADCON) by default, which is the most accurate available for North America, but in the general case (worldwide) this is very hard to determine and there normally is no such thing as a default. The transformation that should be used depends on the exact area covered, accuracy required etc. In other words, user beware and do your homework. 1, 2, 3,

Does GDAL/OGR use the PROJ.4 EPSG init file (/usr/share/proj/epsg) ?

(coming from this gdal-dev thread)

There are special circumstances when the PROJ.4 EPSG init file is consulted (if no definition is found in the pcs/gcs CSV files in the $(GDAL_DATA) directory). But normally GDAL/OGR does not use the PROJ.4 init files at all(contrary to MapServer)

PROJ.4 EPSG init file is periodically generated from the GDAL pcs/gcs.csv files and so they do normally match quite exactly for contemporary GDAL and PROJ.4 released versions.

And for those who wonder where the GADL pcs/gcs CSV files come from, they can get the full picture described in the EPSG tables generation process

Note: See TracWiki for help on using the wiki.