Coordinate System - 52North/IlwisCore GitHub Wiki

A coordinate system contains information on the kind of coordinates you are using in your maps

Design Rationale

A coordinate system is kind of similar to a domain ( and in the future maybe derived from it). It attaches meaning to a tuple of numbers, the coordinate. From the tuple 384997.618269, 73708.004075 it is hard to see were this actually is located. If you know the definition of the coordinate system ( Transverse Mercator, False Easting 500000, Central Meridian 33.0 East and scale factor of 0.9996) you can deduce that is located somewhere in the middle of Uganda; close to the town of Nabwardo. The tuple suddenly means something. So we need an object that can hold a definition of a Coordinate system.

Description

Coordinate system are quite complex. The behaviour is split into a number of sub-types

  • ConventionalCoordinateSystem : By far the most used. Both projected and geographic coordinate system are found under this category. Projected Coordinate systems (and latlon) can usually be transformed into each other. The system uses the properties ellipsoid, projection and geodetic -datum to accurately define the transformation.
  • BoundsOnlyCoordinateSystem : A coordinate system which lacks proper definition of what the coordinates mean. Though its usefullness is limited ( can't combine it with other spatial data) it is used in those cases where there is spatial data which lacks a proper definition of a spatial reference system.
  • FormulaicCoordinateSystem : when you obtained data which is using different XY-coordinates than the coordinate system of your project, and when you know the relation between the two coordinate systems. You can create a coordinate system formula for maps with artificial coordinates, i.e. starting at (0,0) or digitized in millimeters. The coordinate system formula uses a 'related' coordinate system; this is the coordinate system with correct coordinates. When you have defined the formula and when the map with artificial coordinates uses the newly created coordinate system formula, then you can transform the map to the correct coordinate system.
  • TiepointsCoordinateSystem : The coordinate system tiepoints uses a 'related' coordinate system; this is the coordinate system with correct coordinates. When you have specified the tiepoints and transformation method, and when the map with artificial coordinates uses the newly created coordinate system tiepoints, then you can transform the map to the correct coordinate system

CoordinateSystem always will support the methods

Coordinate coord2coord(const ICoordinateSystem &sourceCs, const Coordinate& crdSource) const;
LatLon coord2latlon(const Coordinate &crdSource) const;
Coordinate latlon2coord(const LatLon& ll) const;

The first method translates a coordinate from one system to the other. The second translates a coordinate to the geographic system and the third the other way around.

ConventionalCoordinateSystems

All conventional coordinate systems are projected coordinate systems; even the geographic one(s) but they use a null projection for projection. They most important properties are

  • Projection. A projected coordinate system is defined on a flat, 2D sufrace. A projected coordinate system is based on a geographic coordinate system that is based on a ellipsoid. In a projected coordinate system, positions are identified by x,y coordinates on a grid, were the origin is at the center of the grid. Each position has two values that reference it to that central location. One specifies its horizontal position and the other its vertical position.
  • Ellipsoid. For many maps it is assumed that the Earth is a sphere. However, because of the Earth’s rotation, the shape of the Earth is not a perfect sphere. Actually, the Earth is slightly flattened towards the poles: the equatorial axis (line from the center to the equator) is longer than the polar axis. The Earth's shape can better be represented by an ellipsoid. Over the years, various different ellipsoids are calculated. Variations in calculated ellipsoids are due to the irregularities in the surface of the Earth. The choice of the ellipsoid which fits best a certain region of the Earth surface to be mapped, depends on the surface curvature and undulations in that region. Hence every country has its own 'best fit' ellipsoid.
  • Geodetic Datum (optional) is a reference from which measurements are made. In surveying and geodesy, a datum is a set of reference points on the Earth's surface against which position measurements are made and (often) an associated model of the shape of the Earth (reference ellipsoid) to define a geodetic coordinate system. Horizontal datums are used for describing a point on the Earth's surface, in latitude and longitude or another coordinate system.

In Ilwis-objects these properties are translated in the classes : Projection, Ellipsoid and GeodeticDatum.

BoundsOnlyCoordinateSystem

As the name implies a BoundsOnly system has only bounds. The unit of those bounds is unknown as were it is on the earth. BoundsOnly system often happen after incorrect imports, usage of unknown reference systems or combining spatial software and non spatial software were the reference system gets lost in the process. You can't combine this data with other spatial data as the relation between them can not be established. Still it is usefull as long as your work only is with the dataset with the BoundsOnlyCoordinateSystem.

FormulaicCoordinateSystems

TiepointsCoordinateSystems

⚠️ **GitHub.com Fallback** ⚠️