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

More input to edge costs and LTS #34

Open
3 tasks
dabreegster opened this issue Sep 20, 2023 · 5 comments
Open
3 tasks

More input to edge costs and LTS #34

dabreegster opened this issue Sep 20, 2023 · 5 comments
Milestone

Comments

@dabreegster
Copy link
Collaborator

For all of these, I think we could first just detect this situation about the edge (and surface that info in the UI clearly). Then we can write edge cost and LTS functions that take these things into account, using TBD weightings.

And a further idea: local knowledge (or routing preference) is always going to be helpful. If we have a way in the UI to just annotate a road and edit the LTS / edge cost manually, then that could be super helpful.

@dabreegster dabreegster added this to the v2 milestone Sep 20, 2023
@dabreegster
Copy link
Collaborator Author

Elaborating a bit... we heard feedback about some of the LTS ratings. https://www.openstreetmap.org/way/153773332#map=18/53.46591/-2.83879 is a great example -- this is a separated path next to a highway. Although the separation from fast-moving traffic may be adequate, the noise / general experience from being next to traffic is unpleasant. Somebody using od2net might want to adjust the LTS or cost function accordingly to still penalize this. So some steps would be:

  • Add a new field to Edge to represent this situation. Maybe we can start simple, next_to_motorway: bool
  • In create_from_osm, fill this out for every edge. A simple approach here would be geometric -- buffer a linestring around the edge, then see what other edges match and are roughly parallel. If those other edges have highway=primary or a certain maxspeed, then set to true. We'll probably need to make these rules configurable eventually, but we don't need to at first. Or maybe we could calculate lts first, then look at the LTS of the parallel nearby roads.
  • Plumb through this new field to the cost function
  • Maybe start thinking through a way in the UI to debug this new boolean, so we can make sure it's marking the edges we expect. Kind of similar to steepness, maybe the "edge cost app" page should have more of a concept of layers?

The greenspace and industrial area ones are similar. There's already some code to try and extract greenspace_polygons, but it's only half-started -- I don't remember getting very far for verifying the output of it

@KDKasonde

@KDKasonde
Copy link
Contributor

Sweet thanks for that, I will start having a read through this now!

@KDKasonde
Copy link
Contributor

KDKasonde commented Apr 24, 2024

Hey @dabreegster, just looking at how to visualise the data but noticed the steepness is not included in the EdgeCostApp should I add it in or have I missed something? Also I am now not 100% sure I know what you by layers 😅

@dabreegster
Copy link
Collaborator Author

Apologies, got very behind on emails... Since there's a "Color edges by" selector, slope would be a fine choice to include for networks that have it. Not sure why I didn't wire that in originally.

EdgeCostApp looks broken right now in main with the default "Color by cost relative to length" selector, by the way -- I probably broke this at some point. I'll try and look into it at some point.

You can ignore what I said about layers in the edge cost app. There's already that "color by" dropdown -- we can use that to debug the new per-road info gathered.

@KDKasonde
Copy link
Contributor

No worries at all it happens! And that makes sense I will get started on running my changes in that case.

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