Skip to content

download elements(nodes, ways or relations) using ids from open street map

License

Notifications You must be signed in to change notification settings

shanghuiyang/osmdownloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osmdownloader

CI License

Download elements(nodes, ways or relations) using specific ids from open street map

Install

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.

Usage

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

Example

$ 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