diff options
author | typebrook <typebrook@gmail.com> | 2019-11-11 17:29:05 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2019-11-11 17:29:05 +0800 |
commit | 69311c7f5967711e360ae30308e41bc68646b3a7 (patch) | |
tree | 9e76d705aba8792301584adb7db04a0564377f44 | |
parent | c8f7543236b1c5267c618f8124808c061dd4dc6b (diff) |
update
-rw-r--r-- | utils/osm | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 |
114 | osm.extract.id() { | 114 | osm.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() { | |||
125 | osm.api.upload.to() { | 125 | osm.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 |
147 | osm.file.extract() { | 147 | osm.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 | } |
151 | osm.file.extract.full() { | 151 | osm.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 | } |