Feature request #7208

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

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

Status:Open
Priority:Normal
Assignee:-
Category:Processing/QGIS
Pull Request or Patch supplied:No Resolution:
Easy fix?:No

Description

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

http://furiousgis.blogspot.it/2012/05/python-shapefile-merger-utility.html

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


#!/bin/bash/
DATA=`find . -name '*.shp'`
ogr2ogr -a_srs EPSG:4326 merge.shp
for i in $DATA
do
ogr2ogr -append -update merge.shp $i -f "Esri Shapefile"
done

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... Feedback 06/24/2014

History

#2 Updated by Antonio Locandro over 3 years ago

Any updates on this?

#3 Updated by Giovanni Manghi over 3 years ago

  • Target version set to Future Release - Nice to have

Antonio Locandro wrote:

Any updates on this?

nope.

#4 Updated by Giovanni Manghi 6 months ago

  • Category changed from 44 to Processing/QGIS

#5 Updated by Giovanni Manghi about 2 months ago

  • Easy fix? set to No

Also available in: Atom PDF