-
Notifications
You must be signed in to change notification settings - Fork 67
Rudimentary check for geometry instance dimension #1171
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
base: main
Are you sure you want to change the base?
Conversation
Requirement states "One of the dimensions of the data variable with geometry must be the number of geometries to which the data applies." Currently only checks that the number of non-coordinate variable dimensions is greater than one.
geom_valid.out_of += 1 | ||
# TODO: figure out more robust way of determining instance dimension | ||
# need at least one instance dimension for the geometry variable | ||
if len(set(var.dimensions) - {var.name}) < 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need suggestions on a better check for determining which dimension is related to the number of geometry instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I understand it!
The number of geometry instances should be determined as follow:
-
Check the data variable with the attribute "geometry":
-- Extract the geometry container variable listed under the "geometry" attribute.
-- The geometry container variable should list the attribute "node_coordinates" with the nodes coordinates variables.
-- The nodes coordinates variables should list the attribute "nodes".
-- The number of geometry instances is the dimension of the nodes coordinates variables.
-- This number of geometry instances is also listed in the data variable list of dimensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that makes sense to me.
This looks like we need to have an instance dimension for geometry related variables, but I don't think we have a reliable way of determining that at the moment. |
geom_valid.out_of += 1 | ||
# TODO: figure out more robust way of determining instance dimension | ||
# need at least one instance dimension for the geometry variable | ||
if len(set(var.dimensions) - {var.name}) < 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I understand it!
The number of geometry instances should be determined as follow:
-
Check the data variable with the attribute "geometry":
-- Extract the geometry container variable listed under the "geometry" attribute.
-- The geometry container variable should list the attribute "node_coordinates" with the nodes coordinates variables.
-- The nodes coordinates variables should list the attribute "nodes".
-- The number of geometry instances is the dimension of the nodes coordinates variables.
-- This number of geometry instances is also listed in the data variable list of dimensions.
It could be done by checking out the dimension of SomeVariable with goemetry attribute against (1) the file listed dimension and (2) the node coordinates |
Requirement states "One of the dimensions of the data variable with geometry must be the number of geometries to which the data applies." Currently only checks that the number of non-coordinate variable dimensions is greater than one.