diff options
author | typebrook <typebrook@gmail.com> | 2019-11-11 17:24:40 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2019-11-11 17:24:40 +0800 |
commit | c8f7543236b1c5267c618f8124808c061dd4dc6b (patch) | |
tree | 694dfb55b85ce5c3eb4a7317488e23c14202fa60 | |
parent | 5644da89ef2161985aabcaff719b5e2424509069 (diff) |
update
-rw-r--r-- | utils/osm | 48 |
1 files changed, 29 insertions, 19 deletions
@@ -5,24 +5,34 @@ FILENAME=$0 | |||
5 | osm.help() { | 5 | osm.help() { |
6 | echo " | 6 | echo " |
7 | COMMANDS: | 7 | COMMANDS: |
8 | util.osm.edit | 8 | osm.help |
9 | osm.get | 9 | util.osm.edit |
10 | osm.get.full | 10 | |
11 | osm.get.history | 11 | osm.api.changeset.add |
12 | osm.in_relations | 12 | osm.api.changeset.close |
13 | osm.in_ways | 13 | osm.api.changeset.create |
14 | osm.extract | 14 | osm.api.changeset.update |
15 | osm.extract.ids | 15 | osm.api.fetch |
16 | osm.upload.to | 16 | osm.api.fetch.full |
17 | osm.query | 17 | osm.api.fetch.history |
18 | osm.file.query | 18 | osm.api.member.relation |
19 | osm.api.referenced.relation | ||
20 | osm.api.referenced.way | ||
21 | osm.api.upload.to | ||
22 | |||
23 | osm.file.cat | ||
19 | osm.file.extract | 24 | osm.file.extract |
20 | osm.update | 25 | osm.file.extract.full |
21 | osm.changeset.create | 26 | osm.file.query |
22 | osm.changeset.add | 27 | osm.list.ids |
23 | osm.changeset.update | 28 | osm.list.tag |
24 | osm.changeset.close | 29 | osm.list.tags |
30 | |||
31 | osm.extract.id | ||
32 | osm.member.relation | ||
25 | osm.pbf.update | 33 | osm.pbf.update |
34 | osm.query | ||
35 | osm.update | ||
26 | " | 36 | " |
27 | } | 37 | } |
28 | util.osm.edit() { | 38 | util.osm.edit() { |
@@ -50,7 +60,7 @@ osm.api.fetch.history() { | |||
50 | tee /tmp/osm &&\ | 60 | tee /tmp/osm &&\ |
51 | echo history of $1 $2 are copied into /tmp/osm > /dev/tty | 61 | echo history of $1 $2 are copied into /tmp/osm > /dev/tty |
52 | } | 62 | } |
53 | osm.api.in_relations() { | 63 | osm.api.referenced.relation() { |
54 | curl -X GET $OSM_API/$1/$2/relations |\ | 64 | curl -X GET $OSM_API/$1/$2/relations |\ |
55 | tee /tmp/osm &&\ | 65 | tee /tmp/osm &&\ |
56 | echo relations contain $1 $2 are copied into /tmp/osm > /dev/tty | 66 | echo relations contain $1 $2 are copied into /tmp/osm > /dev/tty |
@@ -67,10 +77,10 @@ osm.file.cat() { | |||
67 | osmium cat $1 --output-format=osm -t $2 | 77 | osmium cat $1 --output-format=osm -t $2 |
68 | } | 78 | } |
69 | osm.api.member.relation() { | 79 | osm.api.member.relation() { |
70 | osm.api.in_relations $1 $2 |\ | 80 | osm.api.referenced.relation $1 $2 |\ |
71 | osm.member.relation $1 $2 $3 | 81 | osm.member.relation $1 $2 $3 |
72 | } | 82 | } |
73 | osm.api.in_ways() { | 83 | osm.api.referenced.way() { |
74 | curl -X GET $OSM_API/node/$1/ways |\ | 84 | curl -X GET $OSM_API/node/$1/ways |\ |
75 | tee /tmp/osm &&\ | 85 | tee /tmp/osm &&\ |
76 | echo ways contain node $1 are copied into /tmp/osm > /dev/tty | 86 | echo ways contain node $1 are copied into /tmp/osm > /dev/tty |