Revisions
-
perrygeo revised this gist
Feb 7, 2016 . No changes.There are no files selected for viewing
-
perrygeo revised this gist
Feb 7, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ do if [ "$ECHO_FEATURES" == "true" ]; then # check for end of array if [[ $line == ]* ]]; then exit 0 fi -
perrygeo created this gist
Feb 7, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash # # ogrcat # produces line-delimited geojson features # Like `fio cat` but uses ogr2ogr under the hood ECHO_FEATURES="" ogr2ogr -f GeoJSON /vsistdout/ "$@" | while read line do if [ "$line" == "\"features\": [" ]; then ECHO_FEATURES="true" else if [ "$ECHO_FEATURES" == "true" ]; then # check for end of array if [ "$line" == "]" ]; then exit 0 fi # strip trailing comma echo $line | sed "s/,$//" fi fi done