Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting the real life routes without using routingkit with Golang #7

Open
khangthinh-huynh19 opened this issue Apr 29, 2024 · 1 comment

Comments

@khangthinh-huynh19
Copy link

In nextplot library, to plot the real life route on the map we have to install the routingkit by using GoLang language.

go install github.com/nextmv-io/go-routingkit/cmd/routingkit@latest

At the present, I am doing a project about creating a Vehicle Routing App on Deepnote platform. This app solve the VRP problem and plot the scheduled routes on a geomap. However, i have tried many methods to install GoLang on Deepnote platform and install the routingkit, it haven't worked.

Do you have any other method that we can plot the practical routes on a geomap without using Golang, a different way to install the routingkit or a process to plot the routes on Deepnote platform (Jupyter Notebook) ?

Thank you for you help <3

@merschformann
Copy link
Member

I am not familiar with the Deepnote platform, but you are probably able to bundle a binary with your app. You can simply compile go-routingkit by doing the following (assuming you cloned the repo and have go installed):

cd cmd/routingkit
GOOS=linux GOARCH=amd64 go build

You need to replace GOOS and GOARCH according to the hardware you are running on. Linux will be a given for a cloud platform like Deepnote here, but GOARCH will either be amd64 or arm64 depending on Deepnote's infrastructure. I wasn't able to find something reliable in their docs quickly.

However, above will create a binary called routingkit in the directory. You need to bundle that with the rest of your code. You should then be able to invoke the local binary like this for example:

nextplot route \
  --input_route output.json\
  --nextroute \
  --rk_osm data/maryland-latest.osm.pbf \
  --rk_bin ./routingkit  # <-- this is where you point nextplot to the routingkit binary (same folder in this case)

I just confirmed in an ubuntu docker container that this works. I hope this works for your use-case as well. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants