I am using the following gdal shell command (gdaltindex
) to create a raster tile index from a directory of raster (tif) files.
find /path/to/raster/directory -name "*.tif" -exec gdaltindex tile-index.shp {} \;
Is there an open source Python approach that can produce the same raster tile index shapefile?
Best Answer
I dont't know, but it's easy to do with osgeo.gdal, GeoPandas and shapely box (
shapely.geometry.box(minx, miny, maxx, maxy, ccw=True)
= bounding box)ΒΆOriginal raster files
With gdalindex
Control
With osgeo.gdal
As Spacedman points out, you can also use rasterio