From 69311c7f5967711e360ae30308e41bc68646b3a7 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 11 Nov 2019 17:29:05 +0800 Subject: update --- utils/osm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'utils/osm') diff --git a/utils/osm b/utils/osm index a7461f0..e1e9bec 100644 --- a/utils/osm +++ b/utils/osm @@ -8,10 +8,10 @@ COMMANDS: osm.help util.osm.edit - osm.api.changeset.add - osm.api.changeset.close osm.api.changeset.create osm.api.changeset.update + osm.api.changeset.add + osm.api.changeset.close osm.api.fetch osm.api.fetch.full osm.api.fetch.history @@ -21,14 +21,14 @@ COMMANDS: osm.api.upload.to osm.file.cat - osm.file.extract - osm.file.extract.full + osm.file.get + osm.file.get.full osm.file.query osm.list.ids osm.list.tag osm.list.tags - osm.extract.id + osm.get.id osm.member.relation osm.pbf.update osm.query @@ -111,7 +111,7 @@ osm.list.tags() { } # extract an element from .osm format STDIN # $1 as [node|way|relation], $2 as id -osm.extract.id() { +osm.get.id() { echo "" sed -nr "/^ *<$1 id=\"$2\".*/,/^ *<\/$1>/p" echo "" @@ -125,7 +125,7 @@ osm.list.ids() { osm.api.upload.to() { tee /tmp/osm |\ - osm.extract.ids |\ + osm.list.ids |\ sed 's#.*#osm.extract \0 < /tmp/osm#g' |\ sed "s/.*/\0 \| osm.api.changeset.add $1/g" |\ while read -r command @@ -144,11 +144,11 @@ osm.file.query() { osmium tags-filter $file $@ --output-format=osm --omit-referenced } # extract an element from osm file -osm.file.extract() { +osm.file.get() { file=$1; shift osmium getid $file $@ --output-format=osm } -osm.file.extract.full() { +osm.file.get.full() { file=$1; shift osmium getid $file $@ --output-format=osm --add-referenced } -- cgit v1.2.3-70-g09d2