Definition of Coordinate Systems
Image Coordinate Systems (ICS)
In the image coordinate system, the image is decomposed into pixels, each addressed by a tuple (i,j).
Map Coordinate Systems (MCS)
A map coordinate system is defined on a flat, two-dimensional surface. Unlike a geographic coordinate system, a map coordinate system has constant lengths, angles, and areas across the two dimensions. A map coordinate system is always based on a geographic coordinate system that is based on a sphere or spheroid.
A 2D coordinate reference system used to approximate the shape of the earth on a planar surface.
It is done in such a way that the distortion that is inherent to the approximation is carefully controlled and known. Distortion correction is commonly applied to calculated bearings and distances to produce values that are a close match to actual field values. The map coordinate system is either a projected CS or a CS which maps the polar coordinates of a geographic CS to 2D-Cartesian coordinates (e.g. Plate Carrée using WGS84).
Geographic Coordinate Systems (GCS)
A geographic coordinate system uses a three-dimensional spherical surface to define locations on the earth. A GCS includes an angular unit of measure, a prime meridian, and a datum (based on a spheroid).
A point is referenced by its longitude and latitude values. Longitude and latitude are angles measured from the earth's centre to a point on the earth's surface. The angles often are measured in degrees (or in grads).
Usage in BEAM
The MCS shall be used by any display component within VISAT where an affine transformation is required between the model coordinates and the component's view coordinates.
GeoCodings and their Coordinate Systems
The following table mirrors the current (16.04.2010) implementation of GeoCodings within BEAM and their usage of Coordinate Systems.
| GeoCoding | Image CS | Map CS | Geo CS |
|---|---|---|---|
| TiePointGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
| GcpGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
| PixelGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
| CrsGeoCoding | is derived from a given map CRS and image to map transformation | is given as parameter | is set to the base CS of the map CS, if possible; else, it is set to WGS84. |
| MapGeoCoding (deprecated) | is derived from a given map CRS and image to map transformation | is given as parameter | is set to the base CS of the map CS, if possible; else, it is set to WGS84. |
| FXYGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
| CombinedFXYGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
| ISINGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
| ModisTiePointGeoCoding | based on Geo CS with GeoCodingMathTransform given in display coordinates (x left to right, y top to bottom) transformation from and to Geo CS is known |
same as Geo CS | DefaultGeographicCRS.WGS84 |
Potential Problems
- For TiePointGeoCoding, GcpGeoCoding, PixelGeoCoding, FXYGeoCoding, CombinedFXYGeoCoding, ModisTiePointGeoCoding: Coordinate Systems are defined by the AbstractGeoCoding. They are not modified by the concrete implementations. If values are given in map coordinates and not in geo coordinates the assumption that Map CS and Geo CS are equal is wrong.
- In GcpGeoCoding the Map CS is always the Geo CS. In case of allowing the user to specify map coordinates for a GCP this would be wrong because the Geo and Map CS may be different. For example for a projected product (UTM) map coordinates are in meter.
- In CrsGeoCoding, it is assumed that the given CRS is always projected. If it is not, the Geo CS is set to the fallback WGS84. This might be wrong in the case that a non-projected CRS is used which is not based on WGS84.
- For ISINGeoCoding the assumption that it is always on WGS84 is wrong. But it is always defined by an a geographic CRS.
Transformations between GeoCoding Coordinate Systems
I = Image CS D = Data Model CS M = Map CS Affine = Set of all affine transformations
Note: the Geo CS needs not to be held as reference in the GeoCoding anymore. If the Map CS is projected the geo coordinates can be derived from the map CS, otherwise the Map CS is equal to the Geo CS.
In VISAT we prefer the Map CS to be the Data Model CS. This is only possible if the transformation between the Image and Map CS is affine.
T(I,M) ∈ Affine ⇒ D = M
Otherwise, the Data Model CS is given by the Image CS:
T(I,M) ∉ Affine ⇒ D = I
In case that a TiePointsGC or a GcpGC is attached to the product, it holds that the transformation T from image to model coordinates is not affine:
T(I,M) ∉ Affine
In case that a CrsGC is attached to the product, it holds that the transformation from image to model coordinates is affine:
T(I,M) ∈ Affine
Thus, in the case that a GcpGC is being attached to a product which had a CrsGC before, T(I,M) changes from being an affine transformation from image into map coordinates into being the identity. Therefore, the map coordinates are not being transformed anymore. Because the data model expects transformed coordinates, the non-transformed coordinates are wrong.
Possible solution
We need to change the treatment of coordinate values within the data model of placemarks:
- In the data model, we only store the model coordinates (given by the feature).
- The image to model transformation is needed in the data model.
- Placemarks should only work with model coordinates no matter if D is equal to M or I.
- The GCPs coordinates for correcting the GeoCoding shall always be given in map coordinates. If the Map CS is unknown, in case of no GeoCoding is defined for the current product, the Map CS must be specified by the user.
- For Pins, map coordinates can always be computed if requested, e.g. for display in the GUI or when exporting pin data (to an ESRI Shapefile)