Hi! I'm having a goal to be able to use osm data offline, if I travel somewhere - I just get a small rectangle part (a city - about 4 square degrees of latitude/longitude) from a big planet.osm.pbf and load it in some program (for now I came to Maperitive, but not sure if it would work).
I wonder how fast such map would render on an average notebook, how long would it take to export a city from planet file, what should I write in osmosis console and if maybe there are better solutions.
I'm asking about exact code to write, because I've already tried
bin\osmosis.bat --read-pbf file=planet-140122.osm.pbf enableDateParsing=no --log-progress interval=30 --bounding-box top=60.5700 left=29.1900 bottom 58.5700 right=31.1900 --write-pbf file=sanktpeterburg.osm.pbf
and got errors.
Thanks for help in advance.
F:\osmosis>bin\osmosis.bat -v --read-pbf file=planet-140122.osm.pbf enableDatePa
rsing=no --buffer --log-progress interval=30 --bounding-box clipIncompleteEntiti
es=true top=60.5700 left=29.1900 bottom=58.5700 right=31.1900 --write-pbf file=s
anktpeterburg2.osm.pbf
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.TaskRegistrar loadJPFPlug
ins
FINE: Searching for JPF plugins.
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.TaskRegistrar loadJPFPlug
ins
FINE: Registering the core plugin.
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.TaskRegistrar loadJPFPlug
ins
FINE: Registering the extension plugins.
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.pipeline.common.Pipeline
prepare
FINE: Building tasks.
эт 29, 2014 1:12:31 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Argument enableDateParsi
ng for task 1-read-pbf was not recognised.
at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.cre
ateTaskManager(TaskManagerFactory.java:64)
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pi
peline.java:50)
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipel
ine.java:112)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)
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:47)
Added:
F:\osmosis>bin\osmosis.bat --read-pbf file=planet-140122.osm.pbf --log-progress
interval=30 --bounding-box clipIncompleteEntities=true top=60.5700 left=29.1900
bottom=58.5700 right=31.1900 --write-pbf file=sanktpeterburg2.osm.pbf
эт 29, 2014 1:06:08 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
эт 29, 2014 1:06:09 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
эт 29, 2014 1:06:09 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
эт 29, 2014 1:06:09 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
java.util.zip.DataFormatException: incorrect data check
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Unknown Source)
at java.util.zip.Inflater.inflate(Unknown Source)
at org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition.parseData(
FileBlockPosition.java:57)
at org.openstreetmap.osmosis.osmbinary.file.FileBlockHead.readContents(F
ileBlockHead.java:95)
at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.
java:135)
at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(Blo
ckInputStream.java:34)
at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
at java.lang.Thread.run(Unknown Source)
эт 29, 2014 1:06:10 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTas
kManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
java.lang.Error: java.util.zip.DataFormatException: incorrect data check
at org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition.parseData(
FileBlockPosition.java:60)
at org.openstreetmap.osmosis.osmbinary.file.FileBlockHead.readContents(F
ileBlockHead.java:95)
at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.
java:135)
at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(Blo
ckInputStream.java:34)
at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.zip.DataFormatException: incorrect data check
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Unknown Source)
at java.util.zip.Inflater.inflate(Unknown Source)
at org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition.parseData(
FileBlockPosition.java:57)
... 5 more
эт 29, 2014 1:06:10 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: 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:47)
asked
28 Jan '14, 19:45
kuzma1
16●1●1●3
accept rate:
0%
I might be tempted to start with an extract of the European part of Russia rather than the whole planet.
Also, what version of Osmosis are you running (i.e. how old is it) and what errors do you actually get?
How can I make such exports myself from a planet.pbf? Can you just provide me with WORKING code? I'm using the latest versions of all programs.
The last time I ran osmosis I did:
and it produced just what I wanted. That was on Linux rather than Windows, but should be otherwise the same. I notice that your example has "bottom 58.5700" - did you really miss the "=" sign out?