aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2019-11-11 08:01:51 +0800
committertypebrook <typebrook@gmail.com>2019-11-11 08:01:51 +0800
commit2b9af80dcb28714dfdf6d4a9caeeb745a083bd4f (patch)
tree17b2f92ac52640e99c68cc798466f2e423bf82a7
parent2fd65c9029ee641f3323c26fd8cc80e3214b5c6b (diff)
update
-rw-r--r--utils/osm5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/osm b/utils/osm
index ca1eb40..7e75ef3 100644
--- a/utils/osm
+++ b/utils/osm
@@ -61,8 +61,13 @@ osm.in_ways() {
61 echo ways contain node $1 are copied into /tmp/osm > /dev/tty 61 echo ways contain node $1 are copied into /tmp/osm > /dev/tty
62} 62}
63osm.extract() { 63osm.extract() {
64
64} 65}
65osm.extract.tags() { 66osm.extract.tags() {
67 /<(node|way|relation)/,/<\/(node|way|relation)/ {
68 /<tag k="name"/ h
69 /<\/(node|way|relation)/ {x;p;s/.*//;x}
70 }
66} 71}
67# extract an element from .osm format STDIN 72# extract an element from .osm format STDIN
68# $1 as [node|way|relation], $2 as id 73# $1 as [node|way|relation], $2 as id