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

Ignore too long shortcuts #69

Open
XioNoX opened this issue Dec 27, 2024 · 8 comments
Open

Ignore too long shortcuts #69

XioNoX opened this issue Dec 27, 2024 · 8 comments
Labels
good first issue Good for newcomers

Comments

@XioNoX
Copy link

XioNoX commented Dec 27, 2024

Screenshot 2024-12-27 at 10-35-37 The low-traffic neighbourhood (LTN) tool v2

See for example this screenshot. LTN says "This shortcut is 2.9x the length of the shortest route using all roads, not just this neighbourhood".

Would it be possible to add an option to ignore those ? Maybe customizable (eg. hide all shortcuts longer than X times longer than the "regular" route) ?

@dabreegster
Copy link
Collaborator

Going further... what if there's also an option to exclude shortcuts if they enter and exit on the same logical "road" (going by name)? Originally I tried something like that, but it's an imperfect heuristic. It's easier now in v2 to expose it as a setting and just let the user try things out, to improve the signal/noise ratio.

@XioNoX
Copy link
Author

XioNoX commented Dec 28, 2024

In the case of a bendy street (or L shaped) a shortcut can still start and end on the same street. That's why I think the shortcut length is what should matter the most (like how it is now).
As there are many possible use-cases, it looks quite complex to have a single solution to improve the signal/noise ratio. I guess the difficulty is to not add a 1000 control knobs in the settings :)
For example I could imagine some use-cases (eg. when the main roads are really congested) where "long" shortcuts could still be problematic and needed to be displayed.

@dabreegster dabreegster added the good first issue Good for newcomers label Jan 12, 2025
@dabreegster
Copy link
Collaborator

Few more questions, then I'll implement this...

  • Should this length filter apply just to the "browse shortcuts to understand them" bit, or also to the overall heatmap? I think both...
  • Once speed limits are working and routing takes that into account, should we consider both ratios of distance and expected time?

@XioNoX
Copy link
Author

XioNoX commented Jan 18, 2025

Should this length filter apply just to the "browse shortcuts to understand them" bit, or also to the overall heatmap? I think both...

I'd say both too.

Once speed limits are working and routing takes that into account, should we consider both ratios of distance and expected time?

I think it would be nice to have. I'd need to test/compare both to really see if one is better than the other for my usecase, but I expect the result to be about the same.
Except in some places where the signed speed is not respected, reminds me of #86

@XioNoX
Copy link
Author

XioNoX commented Jan 19, 2025

New neighborhood, new challenges !

Image

Here the roundabout is used in the wrong direction (in France it's counter-clockwise). But that's a detail.

The main point here is that even though the A to B shortcut (through https://www.openstreetmap.org/way/128909043 ) is indeed shorter than the main roads, it's a pointless shortcut as it on a one way street going back to A.

I have no suggestion/idea though on how to programmatically ignore those shortcuts, but maybe it could be useful to be able to manually "flag" a shortcut as "ignored" ?

A bit similar there :

Image

Cars that come from the right of "Boulevard de l'Europe" can't make a left turn there, so with a one way modal filter on https://www.openstreetmap.org/way/25439590 there are no real shortcuts anymore.

@dabreegster
Copy link
Collaborator

Here the roundabout is used in the wrong direction (in France it's counter-clockwise). But that's a detail.

https://www.openstreetmap.org/way/789313242#map=19/48.409491/-4.483283
Ah good catch, I've forgotten that oneways are implied sometimes. https://wiki.openstreetmap.org/wiki/Key:oneway#Implied_oneway_restriction Need to handle junction=roundabout

it's a pointless shortcut as it on a one way street going back to A.

Ahhh... an amusing case. I'll have to think about how to handle this kind of thing. Thanks!

@dabreegster
Copy link
Collaborator

it's a pointless shortcut as it on a one way street going back to A

We can determine this when initially picking the pairs of entry and exit intersections. This has nothing to do with the shortcut through the neighbourhood at all. We could check what's allowed at the exit intersection. From that exit, if the only reachable point is the entry intersection, then it's this simple redundant case. If there's anything in between, then maybe it's still a shortcut somebody would take, but it could be weighted less, based on how "useful" exiting there is.

@TFCx
Copy link

TFCx commented Jan 19, 2025

There are slightly more complex cases like in this example (there are twice the same problem on top-left and bottom-left) :

Image

https://www.openstreetmap.org/#map=17/43.600230/3.902979

Both of those shortcuts aren't because they would they can't be use to reach anything you wouldn't already by able to reach before taking them.

We could check what's allowed at the exit intersection. From that exit, if the only reachable point is the entry intersection, then it's this simple redundant case. If there's anything in between, then maybe it's still a shortcut somebody would take, but it could be weighted less, based on how "useful" exiting there is.

So I would suggest that you should not only take the first-downstream node of the exit, you should also take the first upstream node of the entry.

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

No branches or pull requests

3 participants