Feature request #7208

replace the "merge shapefiles" code with new more efficient one (python code available)

Added by Giovanni Manghi about 4 years ago. Updated 4 months ago.

Status:Open Start Date:02/21/2013
Priority:Normal Due date:
Assigned to:- % Done:


Target version:Future Release - Nice to have
Platform: Resolution:
Platform version: Pull Request or Patch supplied:No
Status info: Tag:


The "merge shapefiles" tool is very inefficient, when applied to hundreds/thousands of shapes the progress bar barely moves for many hours on a very powerful machine.

I discovered this python code


that does the task in a matter of seconds even for many GB worth of shapefiles.

Its speed is equal, if not faster to an ogr2ogr script

DATA=`find . -name '*.shp'`
ogr2ogr -a_srs EPSG:4326 merge.shp
for i in $DATA
ogr2ogr -append -update merge.shp $i -f "Esri Shapefile"

shapemerger.py (16.8 kB) Giovanni Manghi, 04/11/2013 05:59 am

Related issues

related to QGIS Application - Feature request #9652: merge shapefiles: add option to get the result directly i... Open 02/25/2014
related to QGIS Application - Feature request #10691: "Merge shapefiles to one": add the options available in t... Feedback 06/24/2014


Updated by Antonio Locandro over 3 years ago

Any updates on this?

Updated by Giovanni Manghi over 3 years ago

  • Target version set to Future Release - Nice to have

Antonio Locandro wrote:

Any updates on this?


Updated by Giovanni Manghi 4 months ago

  • Category changed from fTools to Processing/QGIS

Also available in: Atom