aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/csv2geojson
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-01-20 14:24:11 +0800
committertypebrook <typebrook@gmail.com>2020-01-20 14:24:11 +0800
commit0cfb6e999e3f77f98254b4a47e8ef9c258890e8d (patch)
tree92f1e0768c611e59dae0d60b5e1e5ab4ef2001da /scripts/csv2geojson
parent97d07e409fcba279fa0283d3be20ff0d22c66797 (diff)
update
Diffstat (limited to 'scripts/csv2geojson')
-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