
El 01/05/11 19:44, WanMil escribió:
Am 30.04.2011 14:19, schrieb Carlos Dávila:
El 30/04/11 13:00, Henning Scholland escribió:
Am 30.04.2011 12:58, schrieb Henning Scholland:
osmosis --read-pbf europe.osm.pbf --tf accept-ways boundary=administrative --used-node --tf accept-relations boundary=administrative --used-way --write-xml boundary.osm Sorry, I've forgotten an --used-node
osmosis --read-pbf europe.osm.pbf --tf accept-ways boundary=administrative --used-node --tf accept-relations boundary=administrative --used-way --used-node --write-xml boundary.osm I get exactly the same file than without the extra --used-node in the ways --tf task.
I've posted a question to the osmosis mailing list: http://lists.openstreetmap.org/pipermail/osmosis-dev/2011-April/001019.html The osmosis list has the answer:
The osmosis call has to be split to 3 calls (it is possible to use the merge command and to make it in one call but the following works for sure):
osmosis.bat --rb europe.osm.pbf --tf accept-ways boundary=administrative --used-node --wb bways.osm.pbf
osmosis.bat --rb europe.osm.pbf --tf accept-relations boundary=administrative --used-way --used-node --wb brels.osm.pbf
osmosis.bat --rb bways.osm.pbf outPipe.0=W --rb brels.osm.pbf outPipe.0=R --merge inPipe.0=W inPipe.1=R --wb europe-boundaries.osm.pbf
Warning: This really needs a long time to finish.
WanMil Just to complete the information, this is the only osmosis call that worked for me to extract relations: osmosis --rb europe.osm.pbf --tf accept-relations boundary=administrative --used-node idTrackerType=BitSet --used-way idTrackerType=BitSet --wb boundary_relations.osm.pbf Without the idTrackerType=BitSet java heap space errors stop the process. It complains I should have used omitmetadata=true, but completed the task. I don't know if it is because I had previously extracted a bounding box from the original europe.osm.pbf