Hello @davidhassell 

> Are you saying the CRS-WKT stored as an attribute of the grid_mapping 
> variable can contain the actual coordinate values in plain text, as well as 
> the projection definition?

I think no, that is not what I am saying. The CRS definition does not contain 
any actual coordinate values.  It is only the CRS definition.

The CRS-WKT definition includes a definition of a Coordinate System, a system 
of coordinates: which is a component part of a Coordinate Reference System. 
(careful with the similar but distinct terminology)

For example, 
https://secure-web.cisco.com/1u1qVqVl4U8bOVyeL3aTqt2NywDHotMA2uzimI-1NkFb7z7AaesfUVgLr3zOL9JnAffI_ZBC3lAO0m35KADvStsiqttXvI9OiO0mP8lBlJyvpLa_8mXj_6tTZ81Cu0vQyGAHGzNEbQO0NvRKRzrNUVeHrQlw04fYli_Kj-TI2LHyT3EsYWuLBRmJfYT5XutcyvA4MrpWp3vHQTx_z91TPfcIUOSpFHfe7fHPcorKh7mJrSu_YpjbM7bQBijlUVX6JjvyQjSQozXP3w9zhqooGYBN0iMpa0S8UtQvQcG9at1O6dnSpAmz1nR3ygKVG7uoKuKYxu5ewAY1n2wAUbXj24NCu4eCFGqsOYKTMa8UiccuCmAUmJE6VPPVyTSDYiHB00AgGc8TdfY_8jILtJ4Lt4w/https%3A%2F%2Fwww.epsg-registry.org%2Fexport.htm%3Fwkt%3Durn%3Aogc%3Adef%3Acrs%3AEPSG%3A%3A4326
contains the definition
```
  CS[ellipsoidal,2],
    AXIS["latitude",north,ORDER[1]],
    AXIS["longitude",east,ORDER[2]],

```
This includes a dimensionality, in this case 2, and an ordered list of AXIS 
definitions, which shall be the size of the dimensionality.

The key information here is that a single position is defined with respect to 
the CRS by providing that position in the form of a coordinate tuple, which is 
ordered.  Thus, a coordinate value defined with respect to this CRS shall be of 
the form
* ( <latitude_value> , <longitude_value> )

It is fine to provide a list, or array, of coordinate tuples, as long as 
individual tuple order is consistent, e.g.:
* [ ( <latitude_value> , <longitude_value> ) , ( <latitude_value> , 
<longitude_value> ) ]

It is not correct to provide (Axis inversion is banned in coordinate value to 
CRS referencing)
* ~~( <longitude_value> , <latitude_value> )~~

It is not correct to provide
* ~~[<longitude_value> ,  <longitude_value> ...]~~

This is only of import when providing coordinate values and CRS-WKT to an 
application which is aware of these technologies and trying to process the 
spatial information.

Given that a significant majority of CF data will have separate variables 
storing an x and a y coordinate, (lets call them lat and lon) then the only 
additional information I want to provide here is explicit information on 
whether a coordinate values for a single location shall be presented to CRS-WKT 
aware software should be presented as (lat, lon)  or (lon,lat)

It would be really useful to be explicit about providing this single piece of 
relation information for implementers and users of CRS-WKT.  

in this case, I would like to see a netCDF file encoded (pseudo CDL)

```
dimensions:
  lat = 18 ;
  lon = 36 ;
variables:
  double lat(lat) ;
  double lon(lon) ;
  float temp(lat, lon) ;
    temp:long_name = "temperature" ;
    temp:units = "K" ;
    temp:grid_mapping = "crs:lat lon" ;
  int crs ;
    crs:grid_mapping_name = "latitude_longitude"
    crs:semi_major_axis = 6378137 ;
    crs:inverse_flattening = 298.257223563 ;
    crs:crs_wkt = "GEODCRS["WGS 84",
  DATUM["World Geodetic System 1984",
    ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1.0]]],
  CS[ellipsoidal,2],
    AXIS["latitude",north,ORDER[1]],
    AXIS["longitude",east,ORDER[2]],
    ANGLEUNIT["degree",0.01745329252],
  ID["EPSG",4326]]"
```

the line:
```
    temp:grid_mapping = "crs:lat lon" ;
```
is the crucial one, providing an explicit definition that i am relating (lat, 
lon) coordinate value pairs, from the `lat` and `lon` variables, not 
~~(lon,lat)~~ coordinate value pairs.

This syntax is already available in CF, but it does not yet carry the meaning 
which I am suggesting that we add.

mark

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/cf-convention/cf-conventions/issues/223#issuecomment-570189260

This list forwards relevant notifications from Github.  It is distinct from 
[email protected], although if you do nothing, a subscription to the 
UCAR list will result in a subscription to this list.
To unsubscribe from this list only, send a message to 
[email protected].

Reply via email to