Skip to content

Instantly share code, notes, and snippets.

@sgibbes
sgibbes / combine.sh
Created April 5, 2017 14:32 — forked from mappingvermont/combine.sh
Combine all shapefiles in directory, selecting only features where GRID_ID (or DN) is = 1
#!/bin/bash
echo "here"
DATA=`find . -name '*.shp'`
ogr2ogr -a_srs EPSG:4326 merge.shp
for i in $DATA
do
SHP=${i:2:100}
FINAL="${SHP/.shp/}"
echo $FINAL
echo $i