diff options
-rw-r--r-- | utils/osm | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -60,8 +60,13 @@ osm.in_ways() { | |||
60 | tee /tmp/osm &&\ | 60 | tee /tmp/osm &&\ |
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 | } |
63 | # extract an element from .osm format STDIN | ||
64 | osm.extract() { | 63 | osm.extract() { |
64 | } | ||
65 | osm.extract.tags() { | ||
66 | } | ||
67 | # extract an element from .osm format STDIN | ||
68 | # $1 as [node|way|relation], $2 as id | ||
69 | osm.extract.id() { | ||
65 | echo "<osm version=\"0.6\">" | 70 | echo "<osm version=\"0.6\">" |
66 | sed -nr "/^ *<$1 id=\"$2\".*/,/^ *<\/$1>/p" | 71 | sed -nr "/^ *<$1 id=\"$2\".*/,/^ *<\/$1>/p" |
67 | echo "</osm>" | 72 | echo "</osm>" |