I am trying to load a merged osm file. I have set min network size and one way network size to 0. Getting the below error log when trying to import osm pbf file and build the graph
Exception in thread “PBF Reader” java.lang.RuntimeException: Unable to read PBF file.
at com.graphhopper.reader.osm.pbf.PbfReader.run(PbfReader.java:50)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: A PBF decoding worker thread failed, aborting.
at com.graphhopper.reader.osm.pbf.PbfDecoder.sendResultsToSink(PbfDecoder.java:87)
at com.graphhopper.reader.osm.pbf.PbfDecoder.processBlobs(PbfDecoder.java:151)
at com.graphhopper.reader.osm.pbf.PbfDecoder.run(PbfDecoder.java:162)
at com.graphhopper.reader.osm.pbf.PbfReader.run(PbfReader.java:47)
… 1 more
Caused by: java.lang.ClassCastException: cannot be cast to java.lang.Long
at com.graphhopper.reader.osm.pbf.PbfBlobDecoder.processNodes(PbfBlobDecoder.java:189)
at com.graphhopper.reader.osm.pbf.PbfBlobDecoder.processOsmPrimitives(PbfBlobDecoder.java:329)
at com.graphhopper.reader.osm.pbf.PbfBlobDecoder.runAndTrapExceptions(PbfBlobDecoder.java:343)
at com.graphhopper.reader.osm.pbf.PbfBlobDecoder.run(PbfBlobDecoder.java:355)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
… 1 more
@karussell Since I had set min network size and one way network size to 0 while building the graph, the routing has roads included which are dead ends. Is there any way I can filter out dead ends during route calculation? EdgeFilter perhaps is the one I could possible look into, but how do I detect dead ends?
Did you got it working now? The min network setting has only partly to do with dead ends. The settings makes sure that certain dead ends with oneway streets are removed or small subnetworks (regardless of the oneway property)
Well, maybe I am doing something wrong for it to be part of the route first of all. But I think its better to not let the user navigate to dead end and then force him to make a u turn after leading him in first place which is not a good user experience…
It seems to work in graphhopper maps correctly, but it doesn’t if I use google maps to plot the route… I think maybe the osm data is incorrect for Asia in specific. There are roads that are not actually there in real or atleast in google maps, but in osm they are present.