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

rasterize(): given an empty shapes sequence return an empty or filled array #2993

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

sgillies
Copy link
Member

@sgillies sgillies commented Dec 21, 2023

Resolves #2743 by defining an error out of existence.

Also adds an option to not skip invalid shapes. I might want to call rasterize() in "strict" mode and a keyword argument is handier than temporarily turning warnings into exceptions.

@sgillies sgillies added this to the 1.4.0 milestone Dec 21, 2023
@sgillies sgillies self-assigned this Dec 21, 2023
@sgillies sgillies changed the title Given an empty shapes sequence, rasterize() returns an empty array rasterize(): given an empty shapes sequence return an empty or filled array Dec 21, 2023
@sgillies sgillies merged commit ffa3053 into main Dec 21, 2023
1 of 2 checks passed
@sgillies sgillies deleted the issue2743 branch December 21, 2023 21:27
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

Successfully merging this pull request may close these issues.

rasterio.features.rasterize warn & return empty array when no shapes are provided
1 participant