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 option to determine if all touched pixels should be rasterized. #803

Merged
merged 3 commits into from Jul 25, 2019

Conversation

@lossyrob
Copy link
Member

commented Jul 12, 2019

Overview

This PR adds the all_touched option to the rasterized RasterSource. This passes through to the rasterio rasterize method, which uses the all_touched option to determine whether a geometry needs to encompass the center of the pixel in order to be burned into the resulting raster, or if it just needs to touch the pixel.

This option is useful when rasterizing geometries on a low-resolution grid, e.g. for the presence of buildings under a Sentinel-2 pixel, we want that pixel to be marked as building no matter how small or where the building is in the pixel boundary.

@lossyrob lossyrob force-pushed the rde/feature/rasterize-all-touched branch from aa51ef6 to 95b8c7c Jul 15, 2019
@lossyrob lossyrob requested a review from lewfish Jul 17, 2019
@lossyrob lossyrob merged commit 2806952 into master Jul 25, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lewfish lewfish deleted the rde/feature/rasterize-all-touched branch Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.