[osmosis-dev] poly-file exists but not found
Ярослав Минин
yaras_phoenix at inbox.ru
Thu Apr 29 12:40:45 UTC 2021
Hello!
Trying to extract a region from a pbf using poly-file I came across a problem.
My command:
osmosis --read-pbf central-fed-district-latest.osm.pbf --bounding-polygon file="E:\3d\osmosis-0.47.1\bin\mo.poly" --write-pbf mo.pbf
Pbf-file was downloaded from here: https://download.geofabrik.de/russia/central-fed-district.html
Poly-file was downloaded from here: http://polygons.openstreetmap.fr/?id=51490 (378 points) and looks absolutely valid. I’ve put all the files in one osmosis/bin folder and tried to execute command both with and without quotes and full path but still the same error. Tried with version 0.47.1 and 0.48.3. Poly file _exists_ in the folder though error occurs.
ряЁ 29, 2021 2:01:05 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.47.1-1-g80be2971
ряЁ 29, 2021 2:01:06 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
ряЁ 29, 2021 2:01:06 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
ряЁ 29, 2021 2:01:06 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
ряЁ 29, 2021 2:01:06 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to read from polygon file E:\3d\osmosis-0.47.1\bin\mo.poly.
at org.openstreetmap.osmosis.areafilter.common.PolygonFileReader.loadPolygon(PolygonFileReader.java:141)
at org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.process(PolygonFilter.java:66)
at org.openstreetmap.osmosis.core.container.v0_6.BoundContainer.process(BoundContainer.java:59)
at org.openstreetmap.osmosis.areafilter.v0_6.AreaFilter.process(AreaFilter.java:125)
at crosby.binary.osmosis.OsmosisBinaryParser.parse(OsmosisBinaryParser.java:259)
at org.openstreetmap.osmosis.osmbinary.BinaryParser.handleBlock(BinaryParser.java:64)
at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:135)
at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34)
at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: E:\3d\osmosis-0.47.1\bin\mo.poly (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at org.openstreetmap.osmosis.areafilter.common.PolygonFileReader.loadPolygon(PolygonFileReader.java:85)
... 9 more
ряЁ 29, 2021 2:01:06 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.waitForCompletion(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(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
--
Sincerely,
Yaroslav Minin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20210429/750999bc/attachment.htm>
More information about the osmosis-dev
mailing list