0

I'm trying to clip a raster with some polygons, some of them lie party outside of the raster. In gdalwarp, if you set -crop_to_cutline, it will fill the exterior part with no data and make it be a perfect match.

In rasterio.mask (v1.0), using crop does not produce the same results, although logic would point to it. filled is supposed to be True by default.

Before opening an issue in their repo, I wanted to see if I'm doing something wrong, or anyone else encountered this.

Reproducible example: Any raster that you have and a polygon that lies party outside.

  • Is it possible for you to add a code snippet as well as images of what you see in the behavior of rasterio versus what you expect (i.e. results from -crop_to_cutline). – snowman2 Sep 24 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.