Re: [CF-metadata] [cf-convention/cf-conventions] Add unit_conversion_factor for units in coordinate axis to convert to meters (#248)

2020-03-01 Thread Alan D. Snow
I have a list of units I would like to ensure are supported at a minimum here 
to ensure a safe conversion from WKT to the CF convention (note: only the ones 
with the type `length`). See: 
[unit_of_measure.sql](https://github.com/OSGeo/PROJ/blob/d928db15d53805d9b728b440079756081961c536/data/sql/unit_of_measure.sql).

And from what I can tell, only a subset are supported by the CF convention: 
[UDUNITS 
Database](https://www.unidata.ucar.edu/software/udunits/udunits-current/doc/udunits/udunits2.html#Database).

Here are some examples of missing units:
- British foot (Sears 1922) - 3.04799471538676203241e-01
- Indian foot (1975) - 0.3047995
- Gold Coast foot - 3.04799710181508809458e-01

I am sure there are others not supported by CF or WKT currently. When a unit 
that is not supported by the CF convention is found, what is the recommended 
procedure? Is this something that the developers of the `UDUNITS` program are 
interested in keeping in-sync?


-- 
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/248#issuecomment-593187674

This list forwards relevant notifications from Github.  It is distinct from 
cf-metad...@cgd.ucar.edu, 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 
cf-metadata-unsubscribe-requ...@listserv.llnl.gov.

Re: [CF-metadata] [cf-convention/cf-conventions] Add unit_conversion_factor for units in coordinate axis to convert to meters (#248)

2020-02-14 Thread Martin
As Klaus points out, the units need to come from the Udunits list, so the 
correct units attribute would be `US_survey_foot`. 

When I use the Udunits2 linux command line tool, it gives a conversion factor 
of 0.304801, which is significantly less precise. The XML database that comes 
with the python package gives the more precise value of 1200/3937.  

Given that it takes some digging to get the conversion factor out of Udunits, I 
can see a potential case for providing space to add it explicitly. You would 
need, however, to indicate what the target units are, e.g. 
`meter_conversion_factor`.

-- 
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/248#issuecomment-586209060

This list forwards relevant notifications from Github.  It is distinct from 
cf-metad...@cgd.ucar.edu, 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 
cf-metadata-unsubscribe-requ...@listserv.llnl.gov.

Re: [CF-metadata] [cf-convention/cf-conventions] Add unit_conversion_factor for units in coordinate axis to convert to meters (#248)

2020-02-14 Thread Klaus Zimmermann
Units have to come from udunits (see [CF-1.8, 
3.1](http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#units)),
 which will also provide the conversion factors. In this sense, this proposal 
seems unnecessary.

-- 
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/248#issuecomment-586191970

This list forwards relevant notifications from Github.  It is distinct from 
cf-metad...@cgd.ucar.edu, 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 
cf-metadata-unsubscribe-requ...@listserv.llnl.gov.

[CF-metadata] [cf-convention/cf-conventions] Add unit_conversion_factor for units in coordinate axis to convert to meters (#248)

2020-02-13 Thread Alan D. Snow
# Title
Add unit_conversion_factor for units in coordinate axis to convert to meters
# Moderator
Any takers?
# Moderator Status Review [last updated: YY/MM/DD]
???
# Requirement Summary
Currently, in the WKT form, you can specify the conversion factor to meters 
along with the name of the units for a cartesian coordinate system:
```
CS[Cartesian,2],
AXIS["easting (X)",east,
ORDER[1],
LENGTHUNIT["US survey foot",0.304800609601219,
ID["EPSG",9003]]],
AXIS["northing (Y)",north,
ORDER[2],
LENGTHUNIT["US survey foot",0.304800609601219,
ID["EPSG",9003]]]
```
This is also the same for degrees to convert to radians in an ellipsoidal 
projection system:
```
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]]

```
# Technical Proposal Summary
For example:
```
  double y(y);
y:units = "US survey foot";
y:unit_conversion_factor: 0.304800609601219;
y:long_name = "y coordinate of projection";
y:standard_name = "projection_y_coordinate";
  double x(x);
x:units = "US survey foot";
x:unit_conversion_factor: 0.304800609601219;
x:long_name = "x coordinate of projection";
x:standard_name = "projection_x_coordinate";
```

# Benefits
This removes the need of having a lookup table to convert any unit the provider 
gives to meters (or whatever the standard unit is for the axis). It makes the 
provider of the dataset responsible for giving that information to the user.
# Status Quo
I couldn't find something like this in the spec.
# Detailed Proposal
See above ^^


-- 
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/248

This list forwards relevant notifications from Github.  It is distinct from 
cf-metad...@cgd.ucar.edu, 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 
cf-metadata-unsubscribe-requ...@listserv.llnl.gov.