From f6650f4fe81151c804355ab3ca44a4cde9245c7e Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Fri, 20 Oct 2017 09:10:14 -0500 Subject: [PATCH 01/11] Fix grammar in introduction --- conformance.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conformance.adoc b/conformance.adoc index f988ca6..9e76829 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -11,7 +11,7 @@ http://cfconventions.org/cf-conventions/cf-conventions.html[CF Conventions docum If there are any discrepencies between the two, the conventions document is the ultimate authority. -* This document will updated as required to correct mistakes or add new +* This document will be updated as required to correct mistakes or add new material required for completeness or clarity. From 37878c7b08c55a7fb8bab45cd76173a626eac8d7 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Fri, 20 Oct 2017 10:00:38 -0500 Subject: [PATCH 02/11] add geomery requirements --- conformance.adoc | 54 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/conformance.adoc b/conformance.adoc index 9e76829..656bf3e 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -239,7 +239,7 @@ required to express the value. *Requirements:* -* The **`axis`** attribute may only be attached to a coordinate variable. +* The **`axis`** attribute may only be attached to coordinate variables and geometry node coordinate variables (Chapter 7). * The only legal values of axis are **`X`**, **`Y`**, **`Z`**, and **`T`** (case insensitive). * The **`axis`** attribute must be consistent with the coordinate type deduced from **`units`** and **`positive`**. @@ -539,6 +539,58 @@ attributes, they must agree with those of its associated variable. * A climatology variable must not have **`_FillValue`** or **`missing_value`** attributes. +[[geometries]] +=== 7.5 Geometries + +*Requirements:* + +* One of the dimensions of the data variable with geometry must be the number of +geometries to which the data applies. +* The type of the **`geometry`** attribute is a string whose value is the name of +a geometry container variable. The variable name must exist in the file. +* The geometry container variable must hold **`geometry_type`** and +**`node_coordinates`** attributes. +* The only legal values of geometry_type are **`point`**, **`line`**, +and **`polygon`** (case sensitive). +* The type of the **`node_coordinates`** attribute is a string whose value is a +blank separated list of variable names. All specified variable names +must exist in the file. +* The geometry node coordinate variables must each have an **`axis`** attribute. +* A geometry container variable must not have more than one node coordinate variable with a +particular value of the **`axis`** attribute. +* 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 node coordinate variables must all have the same single dimension, +which is the total number of nodes in all the geometries. +* The nodes must be stored consecutively for each geometry and in the order of the +geometries, and within each multipart geometry the nodes must be stored +consecutively for each part and in the order of the parts. +* Polygon exterior rings must be put in anticlockwise order (viewed from above) +and polygon interior rings in clockwise order. +* 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 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. +* 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. +* The single dimension of the part node count variable should equal the total number +of parts in all the geometries. +* For polygon_geometries with holes, the geometry container variable must have +an **`interior_ring`** attribute that contains the name of a variable that indicates +if the polygon parts are interior rings (i.e., holes) or not. +* The interior ring variable must contain the value 0 to indicate an exterior ring +polygon and 1 to indicate an interior ring polygon. +* The single dimension of the interior ring variable must be the same dimension as +that of the part node count variable. + +*Recommendations:* + +* The coordinates of the first and last node in a given ring of a polygon geometry +should be coincident + [[section-20]] [[packed-data]] From 8641950f7ed15ec51e25997763040c6d16244307 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Tue, 21 Nov 2017 08:29:00 -0600 Subject: [PATCH 03/11] Clarify that *nodes* for polygon rings must be in a certain order. --- conformance.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index 656bf3e..da913f6 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -566,7 +566,7 @@ which is the total number of nodes in all the geometries. * The nodes must be stored consecutively for each geometry and in the order of the geometries, and within each multipart geometry the nodes must be stored consecutively for each part and in the order of the parts. -* Polygon exterior rings must be put in anticlockwise order (viewed from above) +* Nodes for polygon exterior rings must be put in anticlockwise order (viewed from above) and polygon interior rings in clockwise order. * 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 @@ -589,7 +589,7 @@ that of the part node count variable. *Recommendations:* * The coordinates of the first and last node in a given ring of a polygon geometry -should be coincident +should be coincident. [[section-20]] From 021ef37c9992d41498de63dd5f43ee436a185c84 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Wed, 13 Dec 2017 16:32:24 -0600 Subject: [PATCH 04/11] Remove case sensitive requirement for geometry type, and remove recommendation of first-last node equivalence for polygons --- conformance.adoc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index da913f6..d6ac978 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -551,7 +551,7 @@ a geometry container variable. The variable name must exist in the file. * The geometry container variable must hold **`geometry_type`** and **`node_coordinates`** attributes. * The only legal values of geometry_type are **`point`**, **`line`**, -and **`polygon`** (case sensitive). +and **`polygon`** (case insensitive). * The type of the **`node_coordinates`** attribute is a string whose value is a blank separated list of variable names. All specified variable names must exist in the file. @@ -586,11 +586,6 @@ polygon and 1 to indicate an interior ring polygon. * The single dimension of the interior ring variable must be the same dimension as that of the part node count variable. -*Recommendations:* - -* The coordinates of the first and last node in a given ring of a polygon geometry -should be coincident. - [[section-20]] [[packed-data]] From 3dd7f179f691830cfe9237f1681cc3d8bf27c8e3 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Wed, 24 Jan 2018 11:50:04 -0600 Subject: [PATCH 05/11] require axis on coordinate vars --- conformance.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conformance.adoc b/conformance.adoc index d6ac978..c367f94 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -561,6 +561,9 @@ particular value of the **`axis`** attribute. * 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. +* If a **`coordinates`** attribute is carried by the geometry container variable, then +those coordinate variables which correspond to node coordinate variables must also have +the **`axis`** attribute. * The geometry node coordinate variables must all have the same single dimension, which is the total number of nodes in all the geometries. * The nodes must be stored consecutively for each geometry and in the order of the From c6e14e24b47c42b0cdb69bfb41147f7468394637 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Wed, 9 May 2018 16:40:11 -0500 Subject: [PATCH 06/11] Revise geometry conformance per David Hassell request --- conformance.adoc | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index c367f94..45f2911 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -552,6 +552,8 @@ a geometry container variable. The variable name must exist in the file. **`node_coordinates`** attributes. * The only legal values of geometry_type are **`point`**, **`line`**, and **`polygon`** (case insensitive). +* For a line **`geometry_type`**, each geometry must have a minimum of two node coordinates. +* For a polygon **`geometry_type`**, each geometry must have a minimum of three node coordinates. * The type of the **`node_coordinates`** attribute is a string whose value is a blank separated list of variable names. All specified variable names must exist in the file. @@ -561,9 +563,9 @@ particular value of the **`axis`** attribute. * 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. -* If a **`coordinates`** attribute is carried by the geometry container variable, then -those coordinate variables which correspond to node coordinate variables must also have -the **`axis`** attribute. +* If a **`coordinates`** attribute is carried by the geometry container variable or its parent data +variable, then those coordinate variables which correspond to node coordinate variables must have a + **`bounds`** attribute that names the corresponding node coordinate. * The geometry node coordinate variables must all have the same single dimension, which is the total number of nodes in all the geometries. * The nodes must be stored consecutively for each geometry and in the order of the @@ -571,19 +573,15 @@ geometries, and within each multipart geometry the nodes must be stored consecutively for each part and in the order of the parts. * Nodes for polygon exterior rings must be put in anticlockwise order (viewed from above) and polygon interior rings in clockwise order. -* 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 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. -* 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. * The single dimension of the part node count variable should equal the total number of parts in all the geometries. -* For polygon_geometries with holes, the geometry container variable must have -an **`interior_ring`** attribute that contains the name of a variable that indicates -if the polygon parts are interior rings (i.e., holes) or not. +* When more than one geometry instance is present and the **`node_count`** attribute on the geometry +container is missing, the geometry type must be **`point`** and the node coordinate dimension size +must be the same as the number of geometry instances. +* If a **`part_node_count`** variable and a **`node_count`** variable are present for a given geometry +container, then the sum of **`part_node_count`** values must equal the sum of **`node_count`** values. +* If the **`interior_ring`** attribute is present on the geometry container, then the **`part_node_count`** +attribute must also be present on the geometry container. * The interior ring variable must contain the value 0 to indicate an exterior ring polygon and 1 to indicate an interior ring polygon. * The single dimension of the interior ring variable must be the same dimension as From f687062fbb37c94c43ad44b4b3e41dd30cd0770b Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Tue, 22 May 2018 09:35:21 -0500 Subject: [PATCH 07/11] Remove uncheckable rule about nodes being in consecutive order per geometry and part --- conformance.adoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index 45f2911..b28fa20 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -568,9 +568,6 @@ variable, then those coordinate variables which correspond to node coordinate va **`bounds`** attribute that names the corresponding node coordinate. * The geometry node coordinate variables must all have the same single dimension, which is the total number of nodes in all the geometries. -* The nodes must be stored consecutively for each geometry and in the order of the -geometries, and within each multipart geometry the nodes must be stored -consecutively for each part and in the order of the parts. * Nodes for polygon exterior rings must be put in anticlockwise order (viewed from above) and polygon interior rings in clockwise order. * The single dimension of the part node count variable should equal the total number From 27cef90c11f5d552255f7e101cf5dcb703b8106c Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Tue, 14 Aug 2018 08:53:10 -0500 Subject: [PATCH 08/11] change bounds to nodes for coordinate variables and geometry --- conformance.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index b28fa20..6770c1f 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -563,9 +563,10 @@ particular value of the **`axis`** attribute. * 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. -* If a **`coordinates`** attribute is carried by the geometry container variable or its parent data -variable, then those coordinate variables which correspond to node coordinate variables must have a - **`bounds`** attribute that names the corresponding node coordinate. +* If a coordinate variable named by a **`coordinates`** attribute carried by the geometry +container variable or its parent data variable has a **`nodes`** attribute, then the **`nodes`** +attribute must be a string whose value is a single variable name. The specified variable must be +a node coordinate variable that exists in the file. * The geometry node coordinate variables must all have the same single dimension, which is the total number of nodes in all the geometries. * Nodes for polygon exterior rings must be put in anticlockwise order (viewed from above) From 9098401f220d4fc66e09c681c67a60453e586c6f Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Mon, 4 Mar 2019 15:02:08 -0600 Subject: [PATCH 09/11] Allow alternate grid mappings for geometry containers Fixes #156 --- conformance.adoc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index 6770c1f..c2ece27 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -544,16 +544,16 @@ attributes. *Requirements:* -* One of the dimensions of the data variable with geometry must be the number of -geometries to which the data applies. * The type of the **`geometry`** attribute is a string whose value is the name of a geometry container variable. The variable name must exist in the file. -* 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 only legal values of geometry_type are **`point`**, **`line`**, and **`polygon`** (case insensitive). * For a line **`geometry_type`**, each geometry must have a minimum of two node coordinates. * For a polygon **`geometry_type`**, each geometry must have a minimum of three node coordinates. +* The **`geometry_dimension`** attribute must name a dimension that is shared by +the data variable. This dimension represents the total number of geometries. * The type of the **`node_coordinates`** attribute is a string whose value is a blank separated list of variable names. All specified variable names must exist in the file. @@ -567,6 +567,11 @@ associated with the container. container variable or its parent data variable has a **`nodes`** attribute, then the **`nodes`** attribute must be a string whose value is a single variable name. The specified variable must be a node coordinate variable that exists in the file. +* If **`grid_mapping`** and **`coordinates`** attributes are carried by the +geometry container variable and the **`grid_mapping`** attribute names a +different grid mapping variable than the **`grid_mapping`** attribute on the +associated data variable, then the variables indicated by the **`coordinates`** +attribute must not have a **`nodes`** attribute. * The geometry node coordinate variables must all have the same single dimension, which is the total number of nodes in all the geometries. * Nodes for polygon exterior rings must be put in anticlockwise order (viewed from above) @@ -576,6 +581,8 @@ of parts in all the geometries. * When more than one geometry instance is present and the **`node_count`** attribute on the geometry container is missing, the geometry type must be **`point`** and the node coordinate dimension size must be the same as the number of geometry instances. +* The variable indicated by the **`node_count`** attribute must use the same +dimension as specified by the **`geometry_dimension`** attribute. * If a **`part_node_count`** variable and a **`node_count`** variable are present for a given geometry container, then the sum of **`part_node_count`** values must equal the sum of **`node_count`** values. * If the **`interior_ring`** attribute is present on the geometry container, then the **`part_node_count`** From 0c3790a3648296476273ef14b6e513b2a94326f4 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Fri, 22 Mar 2019 11:41:34 -0500 Subject: [PATCH 10/11] require coordinates to use same grid mapping as nodes --- conformance.adoc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index c2ece27..d04f98e 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -567,11 +567,8 @@ associated with the container. container variable or its parent data variable has a **`nodes`** attribute, then the **`nodes`** attribute must be a string whose value is a single variable name. The specified variable must be a node coordinate variable that exists in the file. -* If **`grid_mapping`** and **`coordinates`** attributes are carried by the -geometry container variable and the **`grid_mapping`** attribute names a -different grid mapping variable than the **`grid_mapping`** attribute on the -associated data variable, then the variables indicated by the **`coordinates`** -attribute must not have a **`nodes`** attribute. +* If coordinate variables have a **`nodes`** attribute, then the grid mapping of +the coordinate variables must be the same as the grid mapping of the variables indicated by the **`nodes`** attribute. * The geometry node coordinate variables must all have the same single dimension, which is the total number of nodes in all the geometries. * Nodes for polygon exterior rings must be put in anticlockwise order (viewed from above) From 8d324bbdd3774a1eab6e0b2333805a45b6790a35 Mon Sep 17 00:00:00 2001 From: Tim Whiteaker Date: Wed, 15 May 2019 16:31:08 -0500 Subject: [PATCH 11/11] Remove geometry_dimension per cf conventions issue #155 When node_count attribute is missing, require the dimension of the node coordinate variables to be one of the dimensions of the data variable. --- conformance.adoc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/conformance.adoc b/conformance.adoc index d04f98e..f58320a 100644 --- a/conformance.adoc +++ b/conformance.adoc @@ -544,16 +544,14 @@ attributes. *Requirements:* +* One of the dimensions of the data variable with geometry must be the number of geometries to which the data applies. * The type of the **`geometry`** attribute is a string whose value is the name of a geometry container variable. The variable name must exist in the file. -* The geometry container variable must hold **`geometry_type`**, -**`geometry_dimension`**, and **`node_coordinates`** attributes. +* The geometry container variable must hold **`geometry_type`** and **`node_coordinates`** attributes. * The only legal values of geometry_type are **`point`**, **`line`**, and **`polygon`** (case insensitive). * For a line **`geometry_type`**, each geometry must have a minimum of two node coordinates. * For a polygon **`geometry_type`**, each geometry must have a minimum of three node coordinates. -* The **`geometry_dimension`** attribute must name a dimension that is shared by -the data variable. This dimension represents the total number of geometries. * The type of the **`node_coordinates`** attribute is a string whose value is a blank separated list of variable names. All specified variable names must exist in the file. @@ -576,10 +574,9 @@ and polygon interior rings in clockwise order. * The single dimension of the part node count variable should equal the total number of parts in all the geometries. * When more than one geometry instance is present and the **`node_count`** attribute on the geometry -container is missing, the geometry type must be **`point`** and the node coordinate dimension size -must be the same as the number of geometry instances. -* The variable indicated by the **`node_count`** attribute must use the same -dimension as specified by the **`geometry_dimension`** attribute. +container is missing, the geometry type must be **`point`**, and the dimension +of the node coordinate variables must be one of the dimensions of the data +variable. * If a **`part_node_count`** variable and a **`node_count`** variable are present for a given geometry container, then the sum of **`part_node_count`** values must equal the sum of **`node_count`** values. * If the **`interior_ring`** attribute is present on the geometry container, then the **`part_node_count`**