Matrix Requests on Local Install?

Hello everyone,

this is my first post here and I’m quite new to GH, so please excuse (and let me know) if I’m not following forum etiquette or overlooked something.

I set up GH 5.1 running the jar-file on a Win10-System recently (without issues; region is Germany). However, I have to calculate a lot of routes (as in 100 million now and probabily ~10 bn later) and figured out that this will take forever to calculate using individual point-to-point requests (despite using CH; I’ll check out LM once my CH-tests are done). The API mentions the “super fast” matrix calculator, but I couldn’t find any information on the local instance. Is there any way to set up or access the matrix calculation in a local install?

Edit: I found some hints on a Dijkstra-OneToMany-Feature, but wasn’t able to figure out how to activate/access it. Further info on this would be greatly appreciated!

(And can you give me any further advice on speeding up calculations?)

Thank you!
Best regards

The API mentions the “super fast” matrix calculator

We offer the Matrix API as part of our commercial GraphHopper Directions API, yes.

The open source GraphHopper routing engine contains everything you need for custom and fast A-to-B routing and many things beyond this (isochrone, map matching, shortest path tree calculation, but not the matrix calculation). See also this issue.

See the documentation for all the features of the routing engine:

1 Like

@karussell, Thank you very much for the quick answer! That’s what I already suspected. Unfortunately, the commercial API doesn’t help me much, unless you offer a dedicated server with customized map files :wink:

Can you give me a quick info on the OneToMany-Feature? I keep stumbling over it in different posts, but can’t find a hint on how to use it. Is it part of the open source version, or also only of the commercial offer? (and if open source: do you have to build from source or something similar?)


We offer dedicated setups, yes. And if you provide these customized maps and we can consume it just like an ordinary OSM file (or multiple that can be merged) then it will work :slight_smile:

Is it part of the open source version

Yes, it is included in every release of the open source routing engine. See our unit tests like testUseCache on how to use it: graphhopper/ at master · graphhopper/graphhopper · GitHub but it does not support e.g. the QueryGraph.

1 Like

Great, thanks for the infos! I’ll have a look at how to use the OneToMany-Feature, and will eventually come back to you concerning dedicated setups if necessary. For now, I can definitely see a path forward.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.