Skip to content
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 simple way to get bounds of a grid #67

Open
ChrisBarker-NOAA opened this issue Mar 30, 2022 · 3 comments
Open

add simple way to get bounds of a grid #67

ChrisBarker-NOAA opened this issue Mar 30, 2022 · 3 comments

Comments

@ChrisBarker-NOAA
Copy link
Contributor

It would be nice if the Grid objects has a get_bounds() method to provide at least the bounding box, if not a bounding polygon.

(bounding polygon would be nice, but they can be VERY large and complex)

@zklaus
Copy link

zklaus commented Mar 31, 2022

Just leaving this as a possible pointer: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.ConvexHull.html

@ChrisBarker-NOAA
Copy link
Contributor Author

yeah, that's an option, thanks -- and easy enough that we should probably do it.

But some model domains are far from convex -- so a concave hull would be better:

https://pypi.org/project/alphashape/

may be an option for that.

@ChrisBarker-NOAA
Copy link
Contributor Author

One other note:

This is also complicated by the fact that often structured grid models have masked parts of the grid that should be considered when defining the bounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants