Created
February 15, 2011 15:50
-
-
Save mikejs/827680 to your computer and use it in GitHub Desktop.
merge a bunch of shapefiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir merged | |
for f in "$@" | |
do | |
if [ -f merged/merged.shp ] | |
then | |
ogr2ogr -f "esri shapefile" -update -append merged/merged.shp $f -nln Merged | |
else | |
ogr2ogr -f "esri shapefile" merged/merged.shp $f | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment