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

Consolidate no_thru & destination_only #4478

Open
nilsnolde opened this issue Dec 27, 2023 · 4 comments
Open

Consolidate no_thru & destination_only #4478

nilsnolde opened this issue Dec 27, 2023 · 4 comments
Labels
v4 Discussion includes some ideas for a V4 tile format

Comments

@nilsnolde
Copy link
Member

We talked about it before: no_thru & destination_only are really the same thing, especially after #3812. We can't (sanely) re-purpose the bit in the tiles I think, but we could at least slate it for removal in v4. Personally I'd vote to keep the name not_thru, I find it more descriptive than destination_only.

@nilsnolde nilsnolde added the v4 Discussion includes some ideas for a V4 tile format label Dec 27, 2023
@dnesbitt61
Copy link
Member

Do you mean not_thru? These flags are populated by searching the graph to see if graph expansion stops (exhausted) when expanding edges but disallowing expansion using the opposing edge. This would mean there is only 1 entrance/exit to access edges beyond the not_thru edge. We use these to prune graph expansions (bidirectional) that might enter such regions.

Destination only is used when OSM tags specify a way should not be used unless required to get to a destination. This can be different than not_thru since there may be more than one entrance/exit to edges marked as private (or other tags that generate the destination only marking of an edge).

I do not think it makes sense to consolidate these.

@nilsnolde
Copy link
Member Author

Sure, both are determined very differently, but semantically they seem very close, if not identical, at least after #3812. Both signal that we'd rather not enter it in the middle of an expansion but have no problem starting the expansion on top of destonly or inside a not_thru area.

For bidir A* it wouldn't make much of a difference (I think), we prune the branch trying to enter such a region full of not_thrus/destonlys, but we allow expansion from such an edge. And then we could also disallow destonly edges in unidir A* if none of the correlated destination edges is destonly/not_thru, as now we could be sure that all edges inside a private area are marked as such.

Does that make sense or I'm misunderstanding smth?

@nilsnolde
Copy link
Member Author

Hm, maybe for bike/ped it does make a difference whether it's not_thru or destonly.. they don't care about destonly but still want to avoid those private areas.

@nilsnolde
Copy link
Member Author

The middle way could be to mark all edges inside those private areas as destonly but keep the no_thru marking of the entrance edge.. that's not really "consolidating", more a detail for #3812 . still, we could somewhat improve how unidir a* handles destonly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 Discussion includes some ideas for a V4 tile format
Projects
None yet
Development

No branches or pull requests

2 participants