Sunday, April 20, 2008

Using EPSG code in GDAL

EPSG is a code from the European Petroleum Survey Group that makes a numeric codes associated with coordinate system definitions. For example, EPSG:29193 is SAD69 / UTM zone 23S cartographic system. It's possible to browse all coordinate system definitions and codes in Spatial Reference web site.

The GDAL library in FWTools 2.1.0 allows the coordinate systems conversion from images using ESPG code.
These utilities allow the coordinate system (SRS = spatial reference system) to be assigned in a variety of formats.
  • EPSG:n: Coordinate systems (projected or geographic) can be selected based on their EPSG codes, for instance EPSG:27700 is the British National Grid. A list of EPSG coordinate systems can be found in the GDAL data files gcs.csv and pcs.csv.

In the example below is shown how to convert an image in:

PROJCS["SAD69 / UTM zone 24S",GEOGCS["SAD69",DATUM["D_South_American_1969",SPHEROID
gdal_translate -s_srs ESPG:4618 -t_srs EPSG:29194 gcs_sad.tif utm_sad.tif.

No comments: