Feature request #7208
replace the "merge shapefiles" code with new more efficient one (python code available)
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/QGIS | ||
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Easy fix?: | No | Copied to github as #: | 16248 |
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
Related issues
History
#1 Updated by Giovanni Manghi over 11 years ago
- File shapemerger.py added
#2 Updated by Antonio Locandro almost 11 years ago
Any updates on this?
#3 Updated by Giovanni Manghi almost 11 years ago
- Target version set to Future Release - Nice to have
Antonio Locandro wrote:
Any updates on this?
nope.
#4 Updated by Giovanni Manghi almost 8 years ago
- Category changed from 44 to Processing/QGIS
#5 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
#6 Updated by Nyall Dawson over 6 years ago
- Resolution set to wontfix
- Description updated (diff)
- Status changed from Open to Closed
Processing doesn't work on shapefiles alone, so the code provided cannot be used as a replacement. In any case I suspect this issue is fixed in 3.0.