summaryrefslogtreecommitdiffhomepage
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
parent97d07e409fcba279fa0283d3be20ff0d22c66797 (diff)
update
-rw-r--r--alias5
-rwxr-xr-xscripts/csv2geojson4
2 files changed, 7 insertions, 2 deletions
diff --git a/alias b/alias
index 2875877..889fdaf 100644
--- a/alias
+++ b/alias
@@ -49,13 +49,16 @@ alias ld='cd -' # last directory
49cdg(){ 49cdg(){
50 cd ~/git/$1 50 cd ~/git/$1
51} 51}
52alias cdgg='cd ~/git/gist'
53alias cda='cd ~/data' 52alias cda='cd ~/data'
54alias cdd='cd ~/Downloads' 53alias cdd='cd ~/Downloads'
55alias cdD='cd ~/Documents' 54alias cdD='cd ~/Documents'
56alias cdV='cd ~/Videos' 55alias cdV='cd ~/Videos'
57alias cdP='cd ~/Pictures' 56alias cdP='cd ~/Pictures'
58 57
58# gist
59alias gn='gist new'
60alias cdgg='cd ~/git/gist'
61
59# about custom settings 62# about custom settings
60alias cds='cd $SETTING_DIR' 63alias cds='cd $SETTING_DIR'
61alias cdss='cd $SETTING_DIR/scripts' 64alias cdss='cd $SETTING_DIR/scripts'
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