Skip to content

Commit

Permalink
Add geometry_dimension attribute to geometry container
Browse files Browse the repository at this point in the history
Fixes #155
  • Loading branch information
twhiteaker committed Mar 4, 2019
1 parent 7eecd1a commit ca41968
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ch07.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ variables:
datum:inverse_flattening = 298.257223563 ;
int geometry_container ;
geometry_container:geometry_type = "line" ;
geometry_container:geometry_dimension = "instance" ;
geometry_container:node_count = "node_count" ;
geometry_container:node_coordinates = "x y" ;
int node_count(instance) ;
Expand Down Expand Up @@ -668,14 +669,18 @@ The time series variable, someData, is associated with line geometries via the g

A __geometry container__ variable acts as a container for attributes that describe a set of geometries.
The **`geometry`** attribute of the data variable contains the name of a geometry container variable.
The geometry container variable must hold **`geometry_type`** and **`node_coordinates`** attributes.
The geometry container variable must hold **`geometry_type`**, **`geometry_dimension`**, and **`node_coordinates`** attributes.
The **`grid_mapping`** and **`coordinates`** attributes can be carried by the geometry container variable provided they are also carried by the data variables associated with the container.

The **`geometry_type`** attribute indicates the type of geometry present.
Its allowable values are: __point__, __line__, __polygon__.
Multipart geometries are allowed for all three geometry types.
For example, polygon geometries could include single part geometries like the State of Colorado and multipart geometries like the State of Hawaii.

The **`geometry_dimension`** attribute stores the name of the instance dimension
for the geometries.
This dimension must be shared by the data variable related to the geometry container.

The **`node_coordinates`** attribute contains the blank-separated names of the variables that contain geometry node coordinates (one variable for each spatial dimension).
The geometry node coordinate variables must each have an **`axis`** attribute whose allowable values are __X__, __Y__, and __Z__.
If a **`coordinates`** attribute is carried by the geometry container variable or its parent data variable, then those coordinate variables that have a meaningful correspondence with node coordinates are indicated as such by a **`nodes`** attribute that names the corresponding node coordinates.
Expand All @@ -689,7 +694,10 @@ They are put in opposite orders to facilitate calculation of area and consistenc

When more than one geometry instance is present, the geometry container variable must have a **`node_count`** attribute that contains the name of a variable indicating the count of nodes per geometry.
The node count is the total number of nodes in all the parts.
The exception is when all geometries are single part point geometries, in which case a node count is not needed since each geometry contains a single node.
The exception is when all geometries are single part point geometries, in which
case a node count is not needed since each geometry contains a single node.
The variable indicated by the **`node_count`** attribute must use the same
dimension as specified by the **`geometry_dimension`** attribute.

For multipart __lines__, multipart __polygons__, and __polygons__ with holes, the geometry container variable must have a **`part_node_count`** attribute that indicates a variable of the count of nodes per geometry part.
Note that because multipoint geometries always have a single node per part, the **`part_node_count`** is not required for __point__ geometry types.
Expand Down Expand Up @@ -745,6 +753,7 @@ variables:
lon:nodes = "x" ;
float geometry_container ;
geometry_container:geometry_type = "polygon" ;
geometry_container:geometry_dimension = "instance" ;
geometry_container:node_count = "node_count" ;
geometry_container:node_coordinates = "x y" ;
geometry_container:grid_mapping = "datum" ;
Expand Down

0 comments on commit ca41968

Please sign in to comment.