TerraLib and TerraView Wiki Page

This is an old revision of the document!


The Spatial Reference System Module

This module is based on the specifications: ISO 19111 – Geographic information – Spatial Referencing by Coordinates and OGC - Implementation Specification: Coordinate Transformation Services and at providing the mechanisms to represent a coordinate that describes a position on or near the Earth's surface and are referenced to a model of the Earth. Coordinates are referenced to a Coordinate Reference System (CRS). A Coordinate Reference System is a Coordinate System (CS) – an abstract mathematical concept without any relationship to a physical object – that is referenced through a Datum to the Earth or some other object such as a vessel.

The SRS module offers this concepts, as classes of the namespace te::srs: including:SpatialReferenceSystem, GeographicCoordinateSystem,ProjectedCoordinateSystem, GeographicCoordinateSystem, Ellipsoid and Datum. Check the DOxygen documentation of this module, where these and other classes are documented in details.

In practice, users can describe an SRS in different ways:

  • an arbitrary textual description: e.g. “UTM Zone 26S Datum WGS84”
  • using OGC' Well Know Text for SRS: e.g.

''PROJCS[“WGS 84 / UTM zone 26S”,

  GEOGCS["WGS 84",
      DATUM["WGS_1984",
          SPHEROID["WGS 84",6378137,298.257223563,
              AUTHORITY["EPSG","7030"]],
          AUTHORITY["EPSG","6326"]],
      PRIMEM["Greenwich",0,
          AUTHORITY["EPSG","8901"]],
      UNIT["degree",0.01745329251994328,
          AUTHORITY["EPSG","9122"]],
      AUTHORITY["EPSG","4326"]],
  UNIT["metre",1,
      AUTHORITY["EPSG","9001"]],
  PROJECTION["Transverse_Mercator"],
  PARAMETER["latitude_of_origin",0],
  PARAMETER["central_meridian",-27],
  PARAMETER["scale_factor",0.9996],
  PARAMETER["false_easting",500000],
  PARAMETER["false_northing",10000000],
  AUTHORITY["EPSG","32726"],
  AXIS["Easting",EAST],
  AXIS["Northing",NORTH]]
* an unique ID given by an authority SRS Id and Authority responsible, that are used to describe the different components of a SRS. 
* 

The Well-known Text Representation of Spatial Reference Systems, from OGC, is considered the standard textual representation for Spatial Reference System. However other textual representations exist, for example the descriptions used by the PROJ.4 - Cartographic Projections Library. Although it is not a OGC standard, PROJ.4 descriptions are used to represent SRS whenever PROJ.4 is used to perform transformations between two different SRS.

A Mananger is responsible for building SRS from textual representations identified by its types. The figure below shows the classes involved in this operation.