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

Fix spatialite support for Windows #3010

Closed
nilsnolde opened this issue Apr 16, 2021 · 2 comments · Fixed by #3580
Closed

Fix spatialite support for Windows #3010

nilsnolde opened this issue Apr 16, 2021 · 2 comments · Fixed by #3580

Comments

@nilsnolde
Copy link
Member

Currently it's not possible to build tiles with admin & timezone support because spatialite is not correctly set up for some reason. So tiles built on Windows can't

  • use time-dependent routing
  • driving side will be off
  • no border-crossing penalties

(maybe not an exhaustive list of disadvantages..)

@Arkadipta-Chatterjee
Copy link

Can i work on this?

@nilsnolde
Copy link
Member Author

nilsnolde commented Aug 23, 2021

oh yes please, that'd be great! unfortunately we can't give you a lot of guidance here, the vast majority of people here never touches windows. but I can guide you at least to where the relevant code bits are:

  1. valhalla has the ability to build admin (containing mostly country polygons and some related metadata like right/left handed traffic etc) & timezone sqlite db's, where only the former is built using c++, timezones are built using a bash script. it's not strictly necessary to be able to build admins from windows, but it'd be nice to also solve that:
    this is the executable: https://github.com/valhalla/valhalla/blob/master/src/mjolnir/valhalla_build_admins.cc, which you'd run with valhalla_build_admins --config <your_valhalla.json> <your_osm_pbf>, with likely Windows/MSVC not being able to set up this part: https://github.com/valhalla/valhalla/blob/master/src/mjolnir/adminbuilder.cc#L261
  2. once the admin db is built, valhalla will use while building the routing graph to enhance the node information and here it's essential to make it work on windows. this is the approximate flow:

so in the end it's mostly necessary to figure out how to open the spatialite dbs in this function: https://github.com/valhalla/valhalla/blob/master/src/mjolnir/admin.cc#L14

how to set up your windows environment is in the readme and/or in CI.

let us know if smth is unclear!

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

Successfully merging a pull request may close this issue.

2 participants