Opened 9 years ago

Last modified 4 years ago

## #80 closed enhancement

# Add missing CF parameters to translate Coordinate Reference System properties to/from OGC Well-Known Text format — at Initial Version

Reported by: | etourigny | Owned by: | cf-conventions@… |
---|---|---|---|

Priority: | medium | Milestone: | |

Component: | cf-conventions | Version: | |

Keywords: | projections wkt | Cc: | jonathan, pbentley |

### Description

## 1. Title

Add missing CF parameters to translate Coordinate Reference System properties to/from OGC Well-Known Text format.

## 2. Moderator

Jonathan Gregory

## 3. Requirement

CF-1.6 grid mapping parameters do not allow to fully represent Geographic and Projected Coordinate Reference System (CRS) definitions in Open Geospatial Consortium (OGC) Well-Known Text format.

The following WKT nodes cannot be transformed to/from CF-1.6: PROJCS, GEOGCS, DATUM, SPHEROID, TOWGS84, PRIMEM. In particular the absence of parameters that correspond to DATUM and TOWGS84 parameters can cause datum shifting errors.

Adding new parameters to the CF grid_mapping specification would allow to translate projected and geographic CRS WKT definitions to/from CF grid_mapping definitions without loss of information.

This is a simpler and easier approach than including the full OGC WKT string (as proposed in CF Metadata trac ticket #69) and detecting the potential conflicts between the CF and WKT definitions.

## 4. Initial Statement of Technical Proposal

The following grid mapping attributes would be added and described in Table F1

- horizontal_datum_name
- towgs84 (a double-precision array, with 3, 6 or 7 values)
- prime_meridian_name
- reference_ellipsoid_name
- projected_coordinate_system_name
- geographic_coordinate_system_name

The rationale for adding the various name parameters is to ensure a 100% compatibility between OGC WKT definitions and CF grid_mapping definitions and also to make the CF definitions more representative. In general, the names should be equal to the ones used in the EPSG database (see <OGP/EPSG>).

Named datums are particularly troublesome, as there is no unique naming scheme in OGC WKT (see <link2> and <CT>). The use of TOWGS84 parameters (inside a DATUM node) allow to approximate datum shifts to the WGS84 datum, but if precise datum shifts are required (using datum shift grids), then it is important that the datums are uniquely identified. It is required to follow the OGR/Cadcorp naming scheme described in the horizontal_datum_name entry for table F1 below (to ensure compatibility with Simple Features and CT specifications).

For reference the names and parameters of PRIMEM and SPHEROID entries from the EPSG database are provided in <link1> (prime_meridian.csv and ellipsoid.csv). DATUM entries, along with their transformed names and preferred TOWGS84 parameters are given in <link1> (horiz_datum.csv).

A similar proposal could be made to account for vertical CRS (VERT_CS in WKT), but this is outside the scope of this proposal.

As an example, the modified “British National Grid” example below would loose information if it were converted to and from CF-1.6:

PROJCS["unnamed", GEOGCS["unknown", DATUM["unknown", SPHEROID["Spheroid",6377563.396,299.3249646000044]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.9996012717], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], UNIT["metre",1]]

The PROJCS, GEOGCS, DATUM and SPHEROID names are lost, but more importantly the TOWGS84 parameters also. The SPHEROID and PRIMEM parameters are recovered due to existing CF grid_mapping parameters, and the PRIMEM name is restored because Greenwich corresponds to longitude_of_prime_meridian = 0.

### Changes to section 5.6

<at the end of 1st paragraph> The translation of CF coordinate variables to/from OGC Well-Known Text (WKT) format is summarized in a few examples below and described in detail in <link1>.

Example 5.9. Latitude and longitude on the WGS 1984 datum <CF definition> OGC WKT : GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]

Example 5.10. British National Grid <...> char crs ; crs:grid_mapping_name = "transverse_mercator" ; crs:longitude_of_central_meridian = -2. ; crs:false_easting = 400000. ; crs:false_northing = -100000. ; crs:latitude_of_projection_origin = 49. ; crs:scale_factor_at_central_meridian = 0.9996012717 ; crs:longitude_of_prime_meridian = 0. ; crs:semi_major_axis = 6377563.396 ; crs:inverse_flattening = 299.324964600004 ; crs:projected_coordinate_system_name = "OSGB 1936 / British National Grid" ; crs:geographic_coordinate_system_name = "OSGB 1936" ; crs:horizontal_datum_name = "OSGB_1936" ; crs:reference_ellipsoid_name = "Airy 1830" ; crs:prime_meridian_name = "Greenwich" ; crs:towgs84 = 375., -111., 431., 0., 0., 0., 0. ; OGC WKT : PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB_1936", SPHEROID["Airy 1830",6377563.396,299.3249646000044], TOWGS84[375,-111,431,0,0,0,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.9996012717], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], UNIT["metre",1]]

### Changes to Table F1

Attribute | Type | Description |

horizontal_datum_name | S | The name of the geodetic (horizontal) datum, which corresponds to the procedure used to measure positions on the surface of the Earth. Valid datum names and their associated parameters are given in <link1> (horiz_datum.csv, OGC_DATUM_NAME column) and are obtained by transforming the EPSG name using the following rules (used by OGR and Cadcorp): convert all non alphanumeric characters (including +) to underscores, then strip any leading, trailing or repeating underscores. This is to ensure that named datums can be correctly identified for precise datum transformations (see <link2> for more details). Corresponds to a OGC WKT DATUM node name. |

towgs84 | N | This indicates a list of up to 7 Bursa Wolf transformation parameters., which can be used to approximate a transformation from the horizontal datum to the WGS84 datum. More precise datum transformations can be done with datum shift grids. Represented as a double-precision array, with 3, 6 or 7 values (if there are less than 7 values the remaining are considered to be zero). Corresponds to a OGC WKT TOWGS84 node. |

prime_meridian_name | S | The name of the prime meridian associated with the geodetic datum. Valid names are given in <link1> (prime_meridian.csv). Corresponds to a OGC WKT PRIMEM node name. |

|reference_ellipsoid_name | S | The name of the reference ellipsoid. Valid names are given in <link1> (ellipsoid.csv). Corresponds to a OGC WKT SPHEROID node name. |

geographic_coordinate_system_name | S | The name of the geographic coordinate system (GCS). Corresponds to a OGC WKT GEOGCS node name. |

projected_coordinate_system_name | S | The name of the projected coordinate system (PCS). Corresponds to a OGC WKT PROJCS node name. |

### Changes to References

- <link1> https://cf-pcmdi.llnl.gov/trac/wiki/Cf2CrsWkt
- <link2> http://home.gdal.org/projects/opengis/wktproblems.html
- <CT> OpenGIS Coordinate Transformation Service Implementation Specification 1.0 http://www.opengeospatial.org/standards/ct

## 5. Benefits

By implementing this proposal, we should assure that data producers and software developers can include most of the datum information and other decriptive properties of specific projections.

This proposal is much simpler and easier to manage than the proposal in trac ticket #69, which is entirely optional and has failed to reach consensus so far.

## 6. Status Quo

Data producers are forced to add custom WKT entries to their data files without any standard, which does not promote interoperability.

**Note:**See TracTickets for help on using tickets.