Feature request #7208

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

Added by Giovanni Manghi almost 5 years ago. Updated 7 months ago.

Pull Request or Patch supplied:No Resolution:
Easy fix?:No


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 Magnifier (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... Closed 06/24/2014


#2 Updated by Antonio Locandro almost 4 years ago

Any updates on this?

#3 Updated by Giovanni Manghi almost 4 years ago

  • Target version set to Future Release - Nice to have

Antonio Locandro wrote:

Any updates on this?


#4 Updated by Giovanni Manghi 11 months ago

  • Category changed from 44 to Processing/QGIS

#5 Updated by Giovanni Manghi 7 months ago

  • Easy fix? set to No

Also available in: Atom PDF