diff options
author | typebrook <typebrook@gmail.com> | 2020-01-20 14:24:11 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-01-20 14:24:11 +0800 |
commit | 0cfb6e999e3f77f98254b4a47e8ef9c258890e8d (patch) | |
tree | 92f1e0768c611e59dae0d60b5e1e5ab4ef2001da /scripts | |
parent | 97d07e409fcba279fa0283d3be20ff0d22c66797 (diff) |
update
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 | ||