From 2c7ce962ac661f9b80377e1f0ca6069f6f5c9824 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 17 Apr 2017 00:18:21 +0200 Subject: Use jq (not json_pp) for slightly more compact syntax: No space before colon. --- localosmfeature2geojson | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'localosmfeature2geojson') diff --git a/localosmfeature2geojson b/localosmfeature2geojson index dfd1a26..5df4b4b 100755 --- a/localosmfeature2geojson +++ b/localosmfeature2geojson @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Depends: gdal-bin perl-modules +# Depends: gdal-bin jq set -eu @@ -56,5 +56,5 @@ onlineosmxml2geojson() { } onlineosmxml2geojson $features \ - | json_pp -json_opt pretty,canonical \ - | perl -0 -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' + | jq --tab --sort-keys . \ + | perl -0 -pe 's/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' -- cgit v1.2.3