summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/csv2geojson4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/csv2geojson b/scripts/csv2geojson
index 085e12e..d719801 100755
--- a/scripts/csv2geojson
+++ b/scripts/csv2geojson
@@ -40,4 +40,6 @@ jq -s '.[0][2:] as $fields | .[1:][] | [.[0], .[1], ([$fields, .[2:]] | transpos
40# create array of geojson point features 40# create array of geojson point features
41jq '{"type": "Feature", "properties": .[2], "geometry":{ "type": "Point", "coordinates": [(.[0] | tonumber), (.[1] | tonumber)] } }' |\ 41jq '{"type": "Feature", "properties": .[2], "geometry":{ "type": "Point", "coordinates": [(.[0] | tonumber), (.[1] | tonumber)] } }' |\
42# wrap features as geojson format 42# wrap features as geojson format
43jq -s '{"type": "FeatureCollection", "features": .}' 43jq -s '{"type": "FeatureCollection", "features": .}' |\
44tee /tmp/geojson
45echo stored into /tmp/geojson