-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add geometry encoding and decoding functions. #517
Conversation
Only a single geometry variable is supported at present. Contributions to fix this | ||
are welcome. |
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.
I think that is actually a limitation of CF conventions, no? I have a vague memory that it supports at max one geometry variable.
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.
Each variable is only linked to one geometry variable through the geometry
attribute. But I can't see why you can't have multiple geometry variables.
2f73f3c
to
745aee2
Compare
These differ from `shapely_to_cf` and `cf_to_shapely` by returning all variables. Those function, simply encode and decode geometry-related variables.
1. Associate geometry vars as coordinates when we can 2. Add `cf.geometries` 3. Geometries in repr 4. Allow indexing by `"geometry"` or any geometry type.
b5333a7
to
cb7f5d0
Compare
* Document read/write with CF encoding Needs xarray-contrib/cf-xarray#517 * rerun
* main: (35 commits) Add release.yml Allow encoding/decoding multiple geometries (#526) Rewrite unit formatter for pint 0.24 and earlier (#523) [pre-commit.ci] pre-commit autoupdate (#527) Add grid_mapping for geometries if possible (#521) Bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 (#524) Bump codecov/codecov-action from 4.4.1 to 4.5.0 (#525) Add geometry encoding and decoding functions. (#517) Bump links to CF-1.11 (#519) Docs cleanup (#518) Bump codecov/codecov-action from 4.3.0 to 4.4.1 (#514) [pre-commit.ci] pre-commit autoupdate (#510) Bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14 (#509) Add docs about converting between shapely and cf (#512) Bump codecov/codecov-action from 4.1.0 to 4.3.0 (#511) Fix scheduled nightly upstream test Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.12 (#503) Bump codecov/codecov-action from 4.0.0 to 4.1.0 (#504) numpy 2 compat (#505) ruff settings: move 'ignore' to 'lint' section (#506) ...
These differ from
shapely_to_cf
andcf_to_shapely
by returning all variables. Those function, simply encode and decode geometry-related variables.cc @jsignell
xref xarray-contrib/xvec#26