Skip to content

Commit ba13b25

Browse files
committed
added file size flag
1 parent 14f6524 commit ba13b25

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

shp-to-geojson.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
NEWDIR=${2:-"$1/geojson"}
66
for FILE in ${1:-}*.shp # cycles through all files in directory (case-sensitive!)
77
do
8-
echo "converting file: $FILE..."
8+
if [stat -c %s $FILE > 30000000]
9+
then
10+
echo "Skipping $FILE because it's pretty big and GitHub might complain!"
11+
continue
12+
fi
13+
echo "converting file: $FILE...into $NEWDIR$FILENEW..."
914
FILENEW=`echo | basename $FILE | sed "s/.shp/_new.geojson/"` # replaces old filename
1015
ogr2ogr \
1116
-f "GeoJSON" \

0 commit comments

Comments
 (0)