[GIS] How to batch merge shapefiles

mergepython

I have a catalog tree with a number of subfolders.
In every folder there is point and polygon shapefiles. What I want to do is for every type of shapefile point and polygon to do a merge by type.

Is that possible to be done using python or anything else?

Best Answer

You can do this without Python or QGIS if you have GDAL/OGR installed:

ogr2ogr -update -append first.shp second.shp

This will add all the features in second.shp to first.shp (good idea to back up first.shp before running this).

You can write a script to run this command once for all the files you have in your directory.

Related Question