summaryrefslogtreecommitdiff
path: root/localosmfeature2geojson
diff options
context:
space:
mode:
Diffstat (limited to 'localosmfeature2geojson')
-rwxr-xr-xlocalosmfeature2geojson6
1 files changed, 3 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>.
#
-# 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'