How would you find shapes over several geotiffs in a regular grid?


ian.liu88@...
 

I would like to find continguous shapes over a mozaic of geotiff images. Is it possible to do this with rasterio?

I was thinking of an algorithm that finds shapes over individual tiles and marks those shapes that touch the image's edges. Then I would make a second step of unioning those shapes.

Thanks,
Ian


Sean Gillies
 

Hi Ian,

That would be a good approach. Rasterio's polygonizer requires the entire raster to be read into memory and the result polygons are also stored in memory as they are computed. It doesn't scale for very large datasets. There is some discussion of this at https://github.com/rasterio/rasterio/issues/630.


On Tue, Jan 4, 2022 at 12:21 PM <ian.liu88@...> wrote:

I would like to find continguous shapes over a mozaic of geotiff images. Is it possible to do this with rasterio?

I was thinking of an algorithm that finds shapes over individual tiles and marks those shapes that touch the image's edges. Then I would make a second step of unioning those shapes.

Thanks,
Ian



--
Sean Gillies