1

I would like to capture the area that is not in a polygon (option -i) and that doesn't touch that polygon.

gdal_rasterize -at will return the polygon + edges, but gdal_rasterize -at -i will not invert gdal_rasterize -at, but will add pixels on edges to gdal_rasterize.

As a result, the burned area includes the edges, which is not what I want. I was hoping -at -i would have a different result than -i -at, but it didn't.

Is there a simple way of burning everything that is [not inside the polygon OR not on the edge of the polygon] ?

2

Gdal_rasterize uses the center of the pixel. As a workaround I would either rasterize a buffer around your input polygon (with half pixel size) or apply mathematical morphology on the result (aka erosion of one pixel)

| improve this answer | |
  • This is indeed my plan so far (rasterize a buffer). I was looking for something available within gdal to perform this - I hope that, since -at has been implemented, there might have been a need for "-nt" (not touched). Apparently not... – fzd Jul 9 '14 at 12:15

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.