After configuring ORS locally, I managed to get some test routes in Germany functioning well. However, when I try to do a longer route starting in the Netherlands I get the following message:
{"error":{"code":2010,"message":"Could not find routable point within a radius of 1000.0 meters of specified coordinate 0: 4.9434413 52.2882224."},"info":{"engine":{"version":"6.7.1","build_date":"2022-10-17T13:42:43Z"},"timestamp":1666014663917}}
It could be that Germany also isn’t loaded, and it only uses the standard demo file to function. I need some steering in the right direction how to solve this.
currently, you cannot configure more than one osm file for the ors.
Thus, I’d assume that the second entry overwrites the first, and you only get german data.
To check whether you’re running on the “default” data or on your germany-data, request a route anywhere that is not near Heidelberg, e.g. Berlin or Munich - if it works, you’re not running the “default” data.
(Also, building should take more than minutes if your pbf file is decent-sized).
To use data from germany and the netherlands, use a tool like osmium or osmosis to merge the two pbf files into one, see this comment.
~/ors/osmosis$ bin/osmosis --rb de.osm.pbf --rb nl.osm.pbf --merge -wb NL_DE.osm.pbf
Oct 17, 2022 4:52:48 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Only one default (un-named) argument can exist per task. Arguments 7 and 6 have no name.
at org.openstreetmap.osmosis.core.cli.CommandLineParser.parseTask(CommandLineParser.java:303)
at org.openstreetmap.osmosis.core.cli.CommandLineParser.parse(CommandLineParser.java:75)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:74)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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)
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - Before: Total - 2 GB, Free - 48.74 MB, Max: 2 GB, Used - 1.95 GB
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - After: Total - 1024 MB, Free - 999.70 MB, Max: 2 GB, Used - 24.30 MB
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - ========================================================================
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - Total: 0 B (0.0%)
ors-app | 17 Oct 15:42:17 INFO [routing.RoutingProfileManager] - ========================================================================
UPDATE:
Figured out it’s now a memory issue:
Caused by: java.lang.OutOfMemoryError: Java heap space - problem when allocating new memory. Old capacity: 439353344, new bytes:4, segmentSizeIntsPower:20, new segments:1, existing:419
at com.graphhopper.storage.RAMDataAccess.ensureCapacity(RAMDataAccess.java:107) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.reader.PillarInfo.ensureNode(PillarInfo.java:58) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.reader.PillarInfo._setNode(PillarInfo.java:72) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.reader.PillarInfo.setNode(PillarInfo.java:68) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.reader.osm.OSMReader.addNode(OSMReader.java:671) ~[graphhopper-reader-osm-v0.13.21.jar:?]
at com.graphhopper.reader.osm.OSMReader.processNode(OSMReader.java:632) ~[graphhopper-reader-osm-v0.13.21.jar:?]
at com.graphhopper.reader.osm.OSMReader.writeOsm2Graph(OSMReader.java:293) ~[graphhopper-reader-osm-v0.13.21.jar:?]
at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:178) ~[graphhopper-reader-osm-v0.13.21.jar:?]
at com.graphhopper.GraphHopper.importData(GraphHopper.java:735) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.GraphHopper.readData(GraphHopper.java:714) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.GraphHopper.process(GraphHopper.java:701) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.21.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:163) ~[classes/:6.7.1]
at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:184) ~[classes/:6.7.1]
at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:128) ~[classes/:6.7.1]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.7.1]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.7.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
... 1 more
Looking how to adjust this. @jschnell any idea? Thanks for your help so far