OSMOSIS + Windows + planet export of 110Gb = export of some feature

Ciao!

i would like to understand if it is possible to use OSMOSIS under windows and
how to export some feature by specifics tags from the entire planet export of 110Gb of size!

Thanks thanks and again thanks
Alberto

Yes, that is possible. I gather you have found the Osmosis pages in the osm wiki already? Lot’s of detailed usage information in there…

On a sidenote, you do not need to uncompress the planet first. Osmosis works fine with the bz2 archived planet dump which requires much less disk space (but it’s a little bit slower to process the planet).

There is no problem about disk space… i prefer to spend some disk space over spending hours of works…

Anyway… really, it was hard to understand how osmosis work under windows… there are exaples using chmod… ecc ecc but under windows there is NOT chamod!

i’ve downloaded this file:
http://dev.openstreetmap.org/~bretth/osmosis-build/osmosis-latest.zip

but i didn’t found the osmosis.jar like i expect… i’m in wrong??

Does you mean that i’ve to use the osmosis.bat file?!?

Thanks
Alberto

p.s. i would like to extract just the administrative boundary of level 2

Ciao again!

i would try to use this command line under Windows…

bzcat planet-latest.osm.bz2 | osmosis --read-xml file=CONIN$ --tf accept-ways boundary=administrative --tf accept-ways admin_level=2 --tf reject-relations --used-node --write-xml extractedBoundary.osm

i’ve tried with few extracted data… and it returns what i need…

but i tried just the osmosis program… not bzcat…

now i get just a “INFO: Pipeline executing, waiting for completion” but no CPU or memory usage…

is it correct???

THANKS
Alberto

I was able to run something like this: but it get to an error after hours of executing time this moarning…!!

C:\MapData\Open Street Map\osmosis-0.38\bin>bzcat planet-latest.osm.bz2 | osmo
sis --read-xml enableDateParsing=no file=- --tf accept-ways boundary=administrat
ive --tf accept-ways admin_level=2 --tf reject-relations --used-node --write-xml
extractedBoundary.osm
7-dic-2010 9.51.02 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.38
7-dic-2010 9.51.02 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
7-dic-2010 9.51.02 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
7-dic-2010 9.51.02 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
7-dic-2010 12.21.02 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskMan
ager waitForCompletion
GRAVE: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to write long 129
1711862000 to the store.
at org.openstreetmap.osmosis.core.store.DataOutputStoreWriter.writeLong(
DataOutputStoreWriter.java:86)
at org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData.store(Com
monEntityData.java:190)
at org.openstreetmap.osmosis.core.domain.v0_6.Entity.store(Entity.java:1
38)
at org.openstreetmap.osmosis.core.domain.v0_6.Node.store(Node.java:184)
at org.openstreetmap.osmosis.core.container.v0_6.NodeContainer.store(Nod
eContainer.java:49)
at org.openstreetmap.osmosis.core.store.BaseObjectWriter.writeObject(Bas
eObjectWriter.java:63)
at org.openstreetmap.osmosis.core.store.SimpleObjectStore.add(SimpleObje
ctStore.java:106)
at org.openstreetmap.osmosis.tagfilter.v0_6.UsedNodeFilter.process(UsedN
odeFilter.java:78)
at org.openstreetmap.osmosis.core.container.v0_6.NodeContainer.process(N
odeContainer.java:58)
at org.openstreetmap.osmosis.tagfilter.v0_6.UsedNodeFilter.process(UsedN
odeFilter.java:61)
at org.openstreetmap.osmosis.tagfilter.v0_6.TagFilter.process(TagFilter.
java:133)
at org.openstreetmap.osmosis.tagfilter.v0_6.TagFilter.process(TagFilter.
java:133)
at org.openstreetmap.osmosis.tagfilter.v0_6.TagFilter.process(TagFilter.
java:133)
at org.openstreetmap.osmosis.xml.v0_6.impl.NodeElementProcessor.end(Node
ElementProcessor.java:117)
at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.endElement(OsmHand
ler.java:107)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
ce)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:108)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: There is not enough space on the disk
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(Unknown Source)
at java.util.zip.DeflaterOutputStream.deflate(Unknown Source)
at java.util.zip.DeflaterOutputStream.write(Unknown Source)
at java.util.zip.GZIPOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at java.io.DataOutputStream.writeLong(Unknown Source)
at org.openstreetmap.osmosis.core.store.DataOutputStoreWriter.writeLong(
DataOutputStoreWriter.java:84)
… 28 more
7-dic-2010 12.21.02 org.openstreetmap.osmosis.core.Osmosis main
GRAVE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
.
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple
tion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)

bzcat: I/O or other error, bailing out. Possible reason follows.
bzcat: Invalid argument
Input file = planet-latest.osm.bz2, output file = (stdout)

C:\MapData\Open Street Map\osmosis-0.38\bin>