Download elements(nodes, ways or relations) using specific ids from open street map
Osmdownloader is dependent on osmosis. To use osmdownloader, you need to install osmosis first. Please refer to Install Osmosis for learning how to install it on different platforms. Take MacOS as an example,
# install osmosis for MacOS
$ brew install osmosis
Build and install it from source codes.
# get the source codes
$ go get -u github.com/shanghuiyang/osmdownloader
# build and install
$ cd $GOPATH/src/github.com/shanghuiyang/osmdownloader
$ go install
Or download the binary from here.
osmdownloader -f xxx.osm [-n list | -w list | -r list]
-f the output file
-n the id list of nodes
-w the id list of ways
-r the id list of relations
$ osmdownloader -f test.osm -n 111,222,333
# or
$ osmdownloader -f test.osm -w 444,555,666
# or
$ osmdownloader -f test.osm -n 111,111,222 -w 333,444 -r 555,666