How can I store processed osm data and load it back?

Loading osm data to graphhopper could take a couple of minutes of processing. On normal server it doesn’t matter, cause it only hppens once. but if you use a stateless server, in which server instances can be created and destroyed all the time, you’re in a problem.

Is it possible to somehow store the processed graph and and load it once the server powers on?
It might also be useful for android apps, which aren’t always on.

Sure. You just can copy the graph folder. Copy it to the instance before you start and you are done. I just added my graph folder to the docker image. So I have everything there to boot up the image.

1 Like

Wow! Interesting!
So inside the container I should call setGraphHopperLocation but not setDataReaderFile?
Then just call importOrLoad?

As I remember you can call both. If there is a existing graph folder wifh files in it, graphhopper will try to Import them instead of recalculating.

1 Like

Thank you so much!

1 Like
Powered by Discourse