From f67705f4c95eb75b3aa0bf7cbe2b5175a9644a59 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 9 Sep 2015 03:25:56 +0200 Subject: Initial draft. --- poi2geojson | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 poi2geojson (limited to 'poi2geojson') diff --git a/poi2geojson b/poi2geojson new file mode 100755 index 0000000..7bd808a --- /dev/null +++ b/poi2geojson @@ -0,0 +1,14 @@ +#!/bin/sh + +jq "$@" '[{type: "FeatureCollection", features: [.data.pois[] | { + type: "Feature", + geometry: {type: "Point", coordinates: [.point.lng, .point.lat]}, + properties: {type: ( + if .iconid == "green-dot" then "center" + elif .iconid == "green" then "center-begin" + elif .iconid == "yellow-dot" then "member" + elif .iconid == "pink-dot" then "diploma" + elif .iconid == "ltblue-dot" then "diploma-aspiring" + else null end + ), title: .title, location: .address} +}]}]' -- cgit v1.2.3