Skip to content

Instantly share code, notes, and snippets.

@typebrook
Last active November 21, 2020 03:59
Show Gist options
  • Save typebrook/9a26e085c4dfb4bc825e39df1a5fd09b to your computer and use it in GitHub Desktop.
Save typebrook/9a26e085c4dfb4bc825e39df1a5fd09b to your computer and use it in GitHub Desktop.
quick script for 黃超群 #script #rescue #jq
FOR %%f IN (*.json) DO (
jq.exe -f ilter.jq %%f | jq.exe -s "{type: \"FeatureCollection\", features: .}" > %%~nf.geojson
)
.[] |
select(.latitude != 2147483647) |
.properties=.|.type="Feature"|
.geometry={type: "Point", coordinates: [.longitude,.latitude]} |
{ type: "Feature", properties: .properties, geometry: .geometry }
# jq -s '{type: "FeatureCollection", features: .}' > raw.geojson
This file has been truncated, but you can view the full file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment