Tl;dr: I want a "fewer traffic lights, more dedicated bike paths" option.

I know enough about programming and math to assume there's some form of (weighted) graph underlying the routing function (is this straight up openstreetmaps or some conversion in between?), in which case it's not stupid to assume this can be done IF the info is in openstreetmaps.

So what I'd like is (pointers to where I'm likely to find the info are also appreciated) :

  • what information is available in openstreetmaps that would be helpful for this?
  • how does this info get into CoMaps?
  • how is this info used in the routing?
  • is this a feature other people want and/or does CoMaps accept contributions in code (if it seems feasible)?

Thanks in advance!

all 7 comments

sorted by: hot top controversial new old
[–] [S] 1 point 1 year ago

Thanks everyone for the replies! I'll take a look during my free time over the next couple weeks, and will focus any questions I have on the codeberg site then. It's a deep rabbit hole and I haven't touched C/C++ in ages but it seems feasible 😄

  • source
  • [–] 11 points 1 year ago* (last edited 1 year ago)

    The data is based on osm, but a lot of it is removed to reduce map download size. Traffic lights appear to still be there tho. There is already the "routing options" menu where you can set "avoid unpaved roads" for example, so it seems like the routing algorithm they use already supports conditions like this.

    Did you check the old (organicmaps) and new git repositories for existing issues about this? That might answer your last question.

    The repo for comaps is linked in the community description.

    The overall project: https://codeberg.org/comaps

    The app: https://codeberg.org/comaps/comaps

    It says there that they accept code contributions.

  • source
  • [–] 9 points 1 year ago*

    This might be a helpful discussion to start on the git repo :) I dunno if where the project is hosted discussions are a supported feature like github, but it could potentially be opened as a feature request if a discussion isn't an option :)

    Personally I think that would be cool :) It'd be nice to be able to check a few boxes and adjust the route for your needs

    No idea how effort efficient it would be though, in terms of cost to implement vs helpfulness to the userbase

  • source
  • [–] 7 points 1 year ago (1 child)

    Today the routing algorythm is quite basic and does not contain penalties for road features like traffic lights, stop signs or turns, that is why the travel time estimates is always unrealistically low, and this can create routes which may not be the most optimal. A contributor is starting work to add penalties:

    https://codeberg.org/comaps/comaps/issues/817

    If you would like to help out, would be great to have you!

  • source
  • hideshow 1 child comment
  • [–] 7 points 1 year ago* (last edited 1 year ago) (1 child)

    Addendum to my other comment:

    The routing and routing_common folders seem to contain what you are interested in. Looking at bicycle_model.cpp it seems like there is lots of weighting going on so adding something for traffic lights shouldnt be impossible.

  • source
  • hideshow 1 child comment