aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--utils/osm18
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/osm b/utils/osm
index a7461f0..e1e9bec 100644
--- a/utils/osm
+++ b/utils/osm
@@ -8,10 +8,10 @@ COMMANDS:
8 osm.help 8 osm.help
9 util.osm.edit 9 util.osm.edit
10 10
11 osm.api.changeset.add
12 osm.api.changeset.close
13 osm.api.changeset.create 11 osm.api.changeset.create
14 osm.api.changeset.update 12 osm.api.changeset.update
13 osm.api.changeset.add
14 osm.api.changeset.close
15 osm.api.fetch 15 osm.api.fetch
16 osm.api.fetch.full 16 osm.api.fetch.full
17 osm.api.fetch.history 17 osm.api.fetch.history
@@ -21,14 +21,14 @@ COMMANDS:
21 osm.api.upload.to 21 osm.api.upload.to
22 22
23 osm.file.cat 23 osm.file.cat
24 osm.file.extract 24 osm.file.get
25 osm.file.extract.full 25 osm.file.get.full
26 osm.file.query 26 osm.file.query
27 osm.list.ids 27 osm.list.ids
28 osm.list.tag 28 osm.list.tag
29 osm.list.tags 29 osm.list.tags
30 30
31 osm.extract.id 31 osm.get.id
32 osm.member.relation 32 osm.member.relation
33 osm.pbf.update 33 osm.pbf.update
34 osm.query 34 osm.query
@@ -111,7 +111,7 @@ osm.list.tags() {
111} 111}
112# extract an element from .osm format STDIN 112# extract an element from .osm format STDIN
113# $1 as [node|way|relation], $2 as id 113# $1 as [node|way|relation], $2 as id
114osm.extract.id() { 114osm.get.id() {
115 echo "<osm version=\"0.6\">" 115 echo "<osm version=\"0.6\">"
116 sed -nr "/^ *<$1 id=\"$2\".*/,/^ *<\/$1>/p" 116 sed -nr "/^ *<$1 id=\"$2\".*/,/^ *<\/$1>/p"
117 echo "</osm>" 117 echo "</osm>"
@@ -125,7 +125,7 @@ osm.list.ids() {
125osm.api.upload.to() { 125osm.api.upload.to() {
126 126
127 tee /tmp/osm |\ 127 tee /tmp/osm |\
128 osm.extract.ids |\ 128 osm.list.ids |\
129 sed 's#.*#osm.extract \0 < /tmp/osm#g' |\ 129 sed 's#.*#osm.extract \0 < /tmp/osm#g' |\
130 sed "s/.*/\0 \| osm.api.changeset.add $1/g" |\ 130 sed "s/.*/\0 \| osm.api.changeset.add $1/g" |\
131 while read -r command 131 while read -r command
@@ -144,11 +144,11 @@ osm.file.query() {
144 osmium tags-filter $file $@ --output-format=osm --omit-referenced 144 osmium tags-filter $file $@ --output-format=osm --omit-referenced
145} 145}
146# extract an element from osm file 146# extract an element from osm file
147osm.file.extract() { 147osm.file.get() {
148 file=$1; shift 148 file=$1; shift
149 osmium getid $file $@ --output-format=osm 149 osmium getid $file $@ --output-format=osm
150} 150}
151osm.file.extract.full() { 151osm.file.get.full() {
152 file=$1; shift 152 file=$1; shift
153 osmium getid $file $@ --output-format=osm --add-referenced 153 osmium getid $file $@ --output-format=osm --add-referenced
154} 154}