diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/csv2geojson | 4 |
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 |
41 | jq '{"type": "Feature", "properties": .[2], "geometry":{ "type": "Point", "coordinates": [(.[0] | tonumber), (.[1] | tonumber)] } }' |\ | 41 | jq '{"type": "Feature", "properties": .[2], "geometry":{ "type": "Point", "coordinates": [(.[0] | tonumber), (.[1] | tonumber)] } }' |\ |
42 | # wrap features as geojson format | 42 | # wrap features as geojson format |
43 | jq -s '{"type": "FeatureCollection", "features": .}' | 43 | jq -s '{"type": "FeatureCollection", "features": .}' |\ |
44 | tee /tmp/geojson | ||
45 | echo stored into /tmp/geojson | ||