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

Raster clipping #583

Open
adehecq opened this issue Jun 13, 2024 · 2 comments
Open

Raster clipping #583

adehecq opened this issue Jun 13, 2024 · 2 comments
Labels
enhancement Feature improvement or request

Comments

@adehecq
Copy link
Member

adehecq commented Jun 13, 2024

It would be great to have a function to clip a raster to a vector. Currently, the function Raster.crop if passed a vector can crop to the bounds of the vector, but it will not clip (set values to nodata outside the vector outlines).
Vector.crop has an option "clip" to do that. Maybe we could just add a similar "clip" option to Raster.crop that works when the input is a vector?

@rhugonnet
Copy link
Contributor

Good idea, would basically be the equivalent of crop + create_mask + set_mask?

@adehecq
Copy link
Member Author

adehecq commented Jun 14, 2024

Good idea, would basically be the equivalent of crop + create_mask + set_mask?

I think so !

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

No branches or pull requests

2 participants