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

Diagonal filters #41

Open
dabreegster opened this issue Mar 2, 2024 · 7 comments
Open

Diagonal filters #41

dabreegster opened this issue Mar 2, 2024 · 7 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@dabreegster
Copy link
Collaborator

Parity with old version

@dabreegster
Copy link
Collaborator Author

We should discuss before starting this one

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

TFCx commented Jan 12, 2025

Is it a very specific case of intersection customization ?

@dabreegster
Copy link
Collaborator Author

In v1, you could click 4 way intersections to toggle:
image
image
These are used in the US sometimes. I think they can be helpful for grid layouts, with many 4-ways.

@michaelkirk
Copy link
Contributor

michaelkirk commented Jan 22, 2025

I was unable to apply a diagonal filter in v1. Any hint how/where to achieve this?

no-diagonal-filter.mov.mp4

Also, from that video - I'm not sure what's happening when I click an intersection a second time - different shortcuts are counted ($n possible shortcuts pass this) , but there's no visual indication of what happens between the first and second click on an intersection.

@dabreegster
Copy link
Collaborator Author

You need to first change the filter type to the red "no entry":

Image
Then you can click 4-ways:

Image

In the old version, there was a request to default to the green symbol over the red. They mean exactly the same thing in the tool, but have different connotations when shown in a consultation. Unfortunately only the red "no entry" one reasonably shows the direction of the filter. Unsolved design problem. In the new version we're rotating the entire icon right now, but the green one and bus gates look pretty strange as a result. #66 is about figuring out something nicer to do -- maybe keep the walking/cycling icon always upright, and add some kind of rotated line underneath it (without implying that the line means "prohibited")? Or maybe the diagonal filter deserves its own special icon? Or maybe we don't use a circular maplibre symbol layer for diagonal filters at all, but instead a thin line (figuring out something to do at low zoom)?

@michaelkirk
Copy link
Contributor

Just to log my understanding after looking at the v1 code base and interface:

Filters placed on intersections are handled differently from filters placed mid-segment.

When it's a 4-way intersection, any filter is a Diagonal filter. You can click to toggle between the two possible orientations for the diagonal filter.

When it's a 3-way intersection, you can click to toggle which of the 3 roads is "no access" - the other two roads remain connected.

I'm not sure what happens at the more exciting 5+-way intersections, but I feel like we can punt on that for now anyway.

In v2, so far we have no support for intersection filters, only mid-segment filters.

@dabreegster
Copy link
Collaborator Author

All correct.

When it's a 3-way intersection, you can click to toggle which of the 3 roads is "no access" - the other two roads remain connected.
I'm not sure what happens at the more exciting 5+-way intersections, but I feel like we can punt on that for now anyway.

This is just a shorthand for a normal mid-segment filter on each of the 3 or 5 or however many choices, near the intersection.

Notably in v2, we don't have a geometric concept of an intersection; the thickened road line in maplibre stretches to meet the other one. Simplest approach is just a CircleLayer centered on 4-way intersection points, with something visual to hint that the user could put a special diagonal there. Or if the CircleLayer is weird to always be a fixed radius in pixels as you zoom the map, we generate a polygon with a fixed radius in meters and use a FillLayer.

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