summaryrefslogtreecommitdiff
path: root/poi2geojson
diff options
context:
space:
mode:
Diffstat (limited to 'poi2geojson')
-rwxr-xr-xpoi2geojson14
1 files changed, 14 insertions, 0 deletions
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}
+}]}]'