-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify Geometry Dimension on Geometry Container #155
Comments
|
Conformance edits: Ch7 edits: |
Making "geometry_dimension" mandatory is fine with me - it simplifies the conventions (fewer "if X then Y" clauses) and is easy to check for consistency in library code. |
It's better to see the pull requests for the latest edits. |
In the case of |
The key to this that it is the node count variable, rather than the node coordinate variable, that shares its dimension with the data variable. In the special case that there is only one node point per cell, the node count variable may be omitted, leaving us in the situation described at the top of issue, for which you can't know if I don't like using I agree that there should be something in the conformance - but it should be that that the |
That conformance update is included in this pull request with these bullets:
|
The proposed I understand that you want to maintain two dimensions ( |
I would support making the node count variable mandatory (and thus not having the I don't, I'm afraid, see how just knowing the size of the instance dimension is necessarily enough. In the top example, the data variable has two dimensions with the same size as the point node coordinate variable. We still need to know which of these two dimension to attach the code coordinates. This, I reckon, either requires a node count variable or a |
The use case for omission of the node_count variable is when your dataset has millions of instances and you're trying to keep the footprint on disk small. It could also help from a programmatic standpoint, as some GIS implementations treat points and multipoints as separate geometry types, and so knowing the geometry type ahead of time by noticing the absence of a node_count variable can speed up importing geometries from netCDF into an Esri geodatabase point feature class for example. Otherwise, you'd have to test whether every node_count value is 1, which may be fast anyway; I haven't tested this. Taking a step back, I suspect actual usage of the simple geometry specification for single point features will be very rare, since there's already the discrete sampling geometry specification which can accommodate points and is already in use by the community as an archiving standard, a la NCEI's netCDF templates. So whatever we decide, I don't think we should bend over backwards for a use case that may never be realized. |
I agree that the use-case for omitting the node_count variable is persuasive. Maybe I've misunderstood the top example. It has three dimensions which are all equal to 3. |
@davidhassell Any comments on what @JonathanGregory said about:
|
If I understand correctly, @JonathanGregory is proposing that when the node_count variable is omitted, the dimension of the node coordinates must be the same as the data variable dimension to which they apply? E.g.
If we make that a rule for the conventions, I'm happy with this. |
The logical issue I had was, I think, misplaced. We are discussing the encoding here, and if it is clear that these variable share a dimension for convienience, removing the need for a new attribute, then that is fine. |
Yes, that's what I meant. Thanks. You're right that it should be stated as a rule: for |
When node_count attribute is missing, require the dimension of the node coordinate variables to be one of the dimensions of the data variable.
I've made that change to my pull request. I reverted the change about requiring a geometry dimension attribute, and revised the following paragraph to include @JonathanGregory 's sentence. When more than one geometry instance is present, the geometry container variable must have a |
Thanks, Tim. I am happy with all of this. |
Great! According to the contributing guidelines:
If "I am happy with all of this" counts as the final review, then is it merging time? |
Hello all, While I don't want to be "that guy" who stands afar nudging everybody to hastily complete things, I just want to state that in my implementation for CF-1.8 geometries for OGR, corresponding with this pull request I decided to enforce the presence of the |
@wchen329 we shifted away from requiring 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. However in that case, the dimension of the node coordinate variables must be one of the dimensions of the data variable (because it serves also as the instance dimension for geometries). |
@twhiteaker Ah rats, well ever the more reason why we should get this thing pulled up :) thanks for the clarification @twhiteaker I'll make sure to make this is the case in OGR. |
When node_count attribute is missing, require the dimension of the node coordinate variables to be one of the dimensions of the data variable.
Title: Specify Geometry Dimension on Geometry Container
Moderator: @davidhassell
Requirement Summary:
This is in regard to geometries in Chapter 7. For single part point geometries, the node_count variable is omitted since it is not needed. However, node_count is dimensioned using the instance dimension of the geometries, so without node_count, we don't know the geometry instance dimension.
Example of ambiguous geometry instance dimension (could be
foo
orinstance
):Technical Proposal Summary:
Add a
geometry_dimension
attribute to geometry container, which indicates the geometry dimension, as in:Benefits: Who or what will benefit from this proposal?
Software developers can now properly parse the file; they know to which dimension the x, y, and z nodes apply.
Status Quo: Discussion of the current state CF and other standards.
CF already has an
instance_dimension
, but the existence of that attribute normally identifies the variable as a DSG index variable. Therefore, we usegeometry_dimension
.Detailed Proposal: Complete proposal
Require a
geometry_dimension
attribute on geometry container, which identifies the instance dimension of the geometries. This will require updating Ch7 text and examples.The text was updated successfully, but these errors were encountered: