I'm working on a routing service, and been playing around with different projects based off of the OpenStreetMap project.
Here's what I went through to deploy the OpenSourceRoutingMachine project locally.
|
|
We'll startup a container that has that volume mounted it in, and then download the data from the internet and process it as needed.
Prepare the data
|
|
https://download.geofabrik.de/ has a lot of files available that we
can use to import, lets find an .osm.pbf
file, say something at
https://download.geofabrik.de/north-america.html
Inside of the container:
|
|
That file is 14G fyi, and takes about 15m just to download on my connection!
Then extract:
|
|
And you can quit out of that container.
Run the server
|
|
Once that gets going, we can hit it locally and pass the results
through jq
:
|
|
Popple Swamp Road River Road South Kent Road South Warren Hill Road Cornwall Road Kent Road Segar Mountain Road Kenico Road Gorham Road Old Homestead Lane Stonewall Lane
CLI Testing
There's also a library that makes better words out of the responses.
|
|
Quick formatting demo:
|
|
Which gives us:
|
|
Starting a front end
It does come with a front end, but I think Leaflet is more promising as a start.
|
|