summaryrefslogtreecommitdiff
path: root/poi2geojson
blob: a9fac05752a6f9d9086bc2fe81c030a6dea9da2d (plain)
  1. #!/bin/sh
  2. jq "$@" '[{type: "FeatureCollection", features: [.data.pois[] | {
  3. type: "Feature",
  4. geometry: {type: "Point", coordinates: [.point.lng, .point.lat]},
  5. properties: {type: (
  6. if .iconid == "green-dot" then "center"
  7. elif .iconid == "green" then "center-begin"
  8. elif .iconid == "yellow-dot" then "member"
  9. elif .iconid == "pink-dot" then "diploma"
  10. elif .iconid == "ltblue-dot" then "diploma-aspiring"
  11. else null end
  12. ), title: (.title | @html), location: (.address | @html)}
  13. }]}]'