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 3 commits into from Jul 25, 2019


Copy link

@lossyrob lossyrob commented Jul 12, 2019


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
@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
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants