twhiteaker / CFGeom

CF Convention for Representing Simple Geometry Types
MIT License
9 stars 4 forks source link

Draft new section of CF spec. #58

Closed dblodgett-usgs closed 7 years ago

dblodgett-usgs commented 7 years ago

I think we want to create a section 7.5 that basically contains what we added in our previous new section 9.3.5. It will reference section 9.3.3 as a similar encoding pattern only. Will also need to pull content from our changes to section 9.5. Our previous new H.2.6 should be pulled into an appendix, it may be OK in the H appendices as an examaple of how to use the geometry approach with DSGs.

Close this when a draft is ready to go to the CF list for consideration. I think drafting this as a wiki page or a markdown document following ascii doc conventions here: https://github.com/cf-convention/cf-conventions

Previous work on the CF spec is here: https://docs.google.com/document/d/1tpl2VL8Ed_or5BOffawKiaOitOaMuwWh6QzkI1BtCaA/edit?usp=drive_web

twhiteaker commented 7 years ago

I'm happy with the readme and wiki, and the code is now functional enough to demonstrate the concept. Anything else to resolve before drafting the spec?

dblodgett-usgs commented 7 years ago

Don't think so. I'm back in the US and hoping to get to this in the next few days, although I've got a lot on my plate, so it may slip.

dblodgett-usgs commented 7 years ago

Have a look at my start on this over here. https://github.com/dblodgett-usgs/cf-conventions/blob/master/ch07.adoc

The language making sense?

dblodgett-usgs commented 7 years ago

Did a bit more this morning. Probably needs a thorough edit and potentially need to add an appendix example using it with a DSG time series file?

twhiteaker commented 7 years ago

Thanks for doing this! I think an example would be appropriate. I'll review the adoc.

twhiteaker commented 7 years ago

Draft example for appendix

timeseries-with-geometry-ex caption="Example E.1. " .Timeseries with geometry.

dimensions:
  instance = 2 ;
  node = 5 ;
  time = 4 ;
variables:
  int time(time) ;
    time:units = "days since 2000-01-01" ;
  double lat(instance) ;
    lat:units = "degrees_north" ;
    lat:standard_name = "latitude" ;
    lat:geometry = "geometry_container" ;
  double lon(instance) ;
    lon:units = "degrees_east" ;
    lon:standard_name = "longitude" ;
    lon:geometry = "geometry_container" ;
  int crs ;
    crs:grid_mapping_name = "latitude_longitude" ;
    crs:longitude_of_prime_meridian = 0.0 ;
    crs:semi_major_axis = 6378137.0 ;
    crs:inverse_flattening = 298.257223563 ;
  int geometry_container ;
    geometry_container:geometry_type = "line" ;
    geometry_container:node_count = "node_count" ;
    geometry_container:node_coordinates = "x y" ;
  int node_count(instance) ;
  double x(node) ;
    x:units = "degrees_east" ;
    x:standard_name = "longitude" ;
    x:cf_role = "geometry_x_node" ;
  double y(node) ;
    y:units = "degrees_north" ;
    y:standard_name = "latitude" ;
    y:cf_role = "geometry_y_node" ;
  double someData(instance, time) ;
    someData:coordinates = "time lat lon" ;
    someData:grid_mapping = "crs" ;
    someData:geometry = "geometry_container" ;
// global attributes:
  :Conventions = "CF-1.8" ;
  :featureType = "timeSeries" ;
data:
  time = 1, 2, 3, 4 ;
  lat = 30, 50 ;
  lon = 10, 60 ;
  someData =
    1, 2, 3, 4,
    1, 2, 3, 4 ;
  node_count = 3, 2 ;
  x = 30, 10, 40, 50, 50 ;
  y = 10, 30, 40, 60, 50 ;

The time series variable, someData, is associated with line geometries via the geometry attribute. The first line geometry is comprised of three nodes, while the second has two nodes. Client applications unaware of CF geometries can fall back to the lat and lon variables to locate feature instances in space. In this example, lat and lon coordinates are identical to the first node in each line geometry, though any representative point could be used.

dblodgett-usgs commented 7 years ago

Thanks for putting that together. Just incorporate it here: https://github.com/dblodgett-usgs/cf-conventions/blob/master/appe.adoc

twhiteaker commented 7 years ago

Looks like you did. I'm fine with the spec revisions. Ready to close?

dblodgett-usgs commented 7 years ago

Yeah. I'm just pondering what the right way to submit this is now. They are debating switching to github instead of trac for CF 1.8. I think 1.7 is a done deal... I guess I'll just ping the list.

dblodgett-usgs commented 7 years ago

I added a paragraph linking to appendix E, for the record.