I'm looking for a way to get the intersection area between my shapefiles. Basically, I got three shapefiles from my .tif files like this:

gdaltindex a.shp a.tif
gdaltindex b.shp b.tif
gdaltindex c.shp c.tif

This way I got the area of my .tif files. Now I would like to get a new shapefile via intersection. I thought about using gdalwarp, for example like this:

gdalwarp -cutline intersection.shp a.tif a_intersection.tif
gdalwarp -cutline intersection.shp b.tif b_intersection.tif
gdalwarp -cutline intersection.shp c.tif c_intersection.tif

but i can't figure out how to get the intersection.shp file I can do it via QGIS, but would like to do it directly from GDAL. How can I do this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.