[OSM-talk] does one need to download the planet to use osmosis
Peter Körner
osm-lists at mazdermind.de
Mon Nov 16 19:47:11 GMT 2009
>> wget http://planet.openstreetmap.org/planet-latest.osm.bz2 -O - |
>> bzcat
>> osmosis --read-xml "/dev/stdin" --bounding-box top=49.5138
>> left=10.9351 bottom=49.3866 right=11.201 --write-xml "extract.xml"
>
> Isn't this bbox only a few times larger then what the API will download
> in a single call?
The bbox is just a sample from the osmisis wiki page. I just wanted to
outline the process of working with the streaming download.
You can add any command to the pipe, e.g. a sax-parser in php:
wget http://planet.openstreetmap.org/planet-latest.osm.bz2 -O - -q | \
bzcat | php parser.php > data.csv
where parser.php creates a sax-parser reading from STDIN.
Peter
More information about the talk
mailing list