Importin data for europe will result in error

I’d like to import all of europe for my routing server, but have problems doing so.
This is the error I get:

10 errors
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at com.graphhopper.http.GHServer.start(GHServer.java:59)
        at com.graphhopper.http.GHServer.main(GHServer.java:55)
Caused by: java.lang.IllegalStateException: Couldn't load graph
        at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:78)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.AbstractModule.install(AbstractModule.java:122)
        at com.graphhopper.http.GHServer$1.configure(GHServer.java:119)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        ... 5 more
Caused by: java.lang.RuntimeException: Couldn't process file europe.pbf, error: Error while parsing way Way id:15223830, nodes:4, tags:{estimated_distance=72.65533880156622, ref=B 44, smoothness=excellent, surface=asphalt, access:hgv:conditional=destination @ (20:00-06:00), lanes=2, bridge=yes, source=survey, highway=primary, estimated_center=49.725365818858876,8.486650887578373, layer=1, maxspeed:forward=500}
        at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:302)
        at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:150)
        at com.graphhopper.GraphHopper.importData(GraphHopper.java:712)
        at com.graphhopper.GraphHopper.process(GraphHopper.java:681)
        at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:659)
        at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:53)
        at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:64)
        ... 14 more
Caused by: java.lang.RuntimeException: Error while parsing way Way id:15223830, nodes:4, tags:{estimated_distance=72.65533880156622, ref=B 44, smoothness=excellent, surface=asphalt, access:hgv:conditional=destination @ (20:00-06:00), lanes=2, bridge=yes, source=survey, highway=primary, estimated_center=49.725365818858876,8.486650887578373, layer=1, maxspeed:forward=500}
        at com.graphhopper.routing.util.DataFlagEncoder.handleWayTags(DataFlagEncoder.java:265)
        at com.graphhopper.routing.util.EncodingManager.handleWayTags(EncodingManager.java:267)
        at com.graphhopper.reader.osm.OSMReader.processWay(OSMReader.java:357)
        at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:281)
        ... 20 more
Caused by: java.lang.IllegalArgumentException: car fwd maxspeed value too large for encoding: 500, maxValue:140
        at com.graphhopper.routing.util.EncodedValue.checkValue(EncodedValue.java:68)
        at com.graphhopper.routing.util.EncodedDoubleValue.setDoubleValue(EncodedDoubleValue.java:57)
        at com.graphhopper.routing.util.DataFlagEncoder.handleWayTags(DataFlagEncoder.java:215)
        ... 23 more

Does anybody have any idea what’s going on here?
I don’t know much about how the import works but it seems that some speed is too large? Would be great to also understand the problem here.
Whats also funny is that I don’t even use a car profile?!?

Cheers,
Georg

See the wrong tagging of the way: maxspeed:forward=500 you should be able to fix this via editing OSM or disable reading the maxspeed values

Ok, so this means that in the OSM data there is a wrong value? Like the max-speed of a road set to 500?
Can you tell me how I can disable the maxspeed reading? (in my hiking profile I guess max speed doesn’t do much anyway?!?) Do I need to do that in code or just in a config file?

In the code, see the DataFlagEncoder

Hm… don’t really get it… Currently the value is 140. If I change it to f.e. 500, It throws an exception that the value 500 does not fit into 5 bits. But neither does 140?!?

Do you use the latest master? I had the same exception some time ago and I think I fixed the DataFlagEncoder maybe 3 months ago.

I figured out that indeed there was an error in the OSM data at the location from my logs (a bridge with max-speed of 500 which was supposed to be 50)
I fixed that in OSM and also disabled the check for those values and now it had no problem importing the data. So my problem is fixed for now…
Still I don’t know why it was complaining when i upped my maxAllowedSpeed to 500 saying it doesn’t fit in 5 bits, cause neither does the value 140 which it was. Also I think it’s weird that the import is stopped because of one little typo in OSM data. Shouldn’t it … i don’t know… just log the osm ids that are invalid so that people can check those… and then continue importing?

Still I don’t know why it was complaining when i upped my maxAllowedSpeed to 500 saying it doesn’t fit in 5 bits, cause neither does the value 140 which it was.

The speedFactor is used (140/speedFactor) to make it fit into the 5 bits…

Well warnings are almost never really fixed and so we are a bit strict in this case as fixing the data is really easy AND rare. But yes, it is subjective.