CRS Subsystem Development
Status: beta (2010-01-22)
Design and implementation documentation for the deegree3 CRS subsystem.
1. CRS ids
The codes for CRSs (and also any other identifiable OGC objects) are formally called URNs. There is a paper from the OGC that discusses the forms of URNs. (last visited 22/01/2010)
Currently, the CRS database contains the CRSs from the EPSG database plus a few custom CRSs (e.g. the CRS used by Google maps). There have been cases of different spellings/forms of the same EPSG crs ids ("EPSG" and the code number were always present though). Here are the forms for which the EPSG 4326 code (the code may have 4, 5 or 6 digits) can appear:
EPSG:4326
URN:OGC:DEF:CRS:EPSG::4326
URN:X-OGC:DEF:CRS:EPSG::4326
HTTP://WWW.OPENGIS.NET/GML/SRS/EPSG.XML#4326
URN:OPENGIS:DEF:CRS:EPSG::4326
Also note:
between the last two colons (::), there can appear the version of the code, e.g. URN:X-OGC:DEF:CRS:EPSG:6.11:4326. In the case of EPSG 4326, the CRS with this version (6.11) is actually different (the axes are switched); however this is not a rule.
- there are variants where the two colons (::) are replaced by one colon (:).
2. Component definitions
2.1. Ellipsoids
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- semiMajorAxis [1] double
- eccentricity OR inverseFlattening OR semiMinorAxis [1] double
- unit [1] {metre, degree, britishyard, usfoot, arcsec, unknown}
2.2. Geodetic datums
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- usedEllipsoid [1] string
- usedPrimeMeridian [0..1] string
- usedWGS84ConversionInfo [0..1] string
2.3. Prime Meridian
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- unit [1] {metre, degree, britishyard, usfoot, arcsec, unknown}
- longitude [1] double (may contain the attribute inDegrees)
2.4. Axis
- name [1] String
- unit [1] {metre, degree, britishyard, usfoot, arcsec, unknown}
- axisOrientation [1] {north, south, west, east, front, back, up, down, other, perpendicular}
2.5. Coordinate systems
2.5.1. Geographic CRS
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- Axis [1..3] Axis
- axisOrder [1] string
polynomialTransformation [0..1] LeastSquareTransformation (with attribute class as string)
- usedDatum [1] string
2.5.2. Compound CRS
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- usedCRS [1] string
- heightAxis [1] Axis
- defaultHeight [0..1] double
2.5.3. Geocentric CRS
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- Axis [1..3] Axis
- axisOrder [1] string
polynomialTransformation [0..1] LeastSquareTransformation (with attribute class as string)
- usedDatum [1] string
2.5.4. Projected CRS
- id: [1...n] string
- name: [0...n] string
- version: [0...n] string
- description: [0...n] string
- areaOfUse: [0...n] string
- Axis [1..3] Axis
- axisOrder [1] string
polynomialTransformation [0..1] LeastSquareTransformation (with attribute class as string)
- usedGeographicCRS [1] string
projection [1] DefinedProjection (which may contain the attribute class)
2.6. Projections Definitions
2.6.1. defined Projections
lambertAzimuthalEqualArea Projection OR lambertConformalConic LambertConformalConicType OR stereographicAzimuthal StereographicAzimuthalType OR stereographicAlternative ProjectionBaseType OR transverseMercator TransverseMercator OR mercator Projection
2.6.2. LatLon
of type double (with optional attribute inDegrees boolean)
2.6.3. Projection
latitudeOfNaturalOrigin [0..1] LatLon
longitudeOfNaturalOrigin [0..1] LatLon
- scaleFactor [0..1] double
- fileEasting [0..1] double
- fileNorthing [0..1] double
(with optional attribute class string)
2.6.4. TransverseMercator
- Projection +
- northemHemisphere [0..1] boolean
2.6.5. StereographicAzimuthal
- Projection +
trueScaleLatitude [0..1] LatLon
2.6.6. LambertConformalConicType
- Projection +
firstParallelLatitude [0..1] LatLon
secondParallelLatitude [0..1] LatLon
3. Modelling the Projection (discussion 03/03/09)
The Projection table currently stores a reference to the GeographicCRS. This is inefficient if more GeographicCRSs are used with the same projection parameters. Currently, there is no evidence of such a case (although the EPSG-registry appears to be modeling it independently) . The Java class model has the same configuration (e.g. the Projection constructor has a GeographicCRS parameter). In this case however a separation between Projection and GeographicCRS would lead to new conversion classes for each transformation and hence make the design difficult to understand.
A Projection (concrete instances: TransverseMercator, LambertConfomalConic, LambertAzimuthalEqualArea, StereographicAzimuthal, StereographicAlternative) applied to a GeographicCRS results in a ProjectedCRS. The Projection needs to access Ellipsoid-specific data through the Datum of the GeographicCRS.