I want to export EXTENT as Rectangular shp file from multiple shape using OGR2OGR?
[GIS] How to export Extent as shapefile from multiple shapefiles using OGR
ogr2ogrshapefile
ogr2ogrshapefile
I want to export EXTENT as Rectangular shp file from multiple shape using OGR2OGR?
Best Answer
For this special purpose you can use the ogrtindex tool http://gdal.org/ogrtindex.html. The tool is made for creating footprints of vector datasets to be used as a tileindex file with MapServer http://www.mapserver.org/optimization/tileindex.html. Nonetheless, the tool makes exactly what you want even without MapServer.
Another, more general option would be to use ogr2ogr, query the extent of each shapefile with SQL one by one, and append results to the final index file:
Command for testing the system with ogrinfo follows. You can add more attributes into SELECT for getting some metadata into the result but this show the most simple query.
When you see that the command works you can create the index shape as