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

vector tile: add no-thru traffic restrictions layer #6146

Open
wants to merge 1 commit into
base: dev-2.x
Choose a base branch
from

Conversation

flaktack
Copy link
Contributor

@flaktack flaktack commented Oct 11, 2024

Summary

The new vector tile layers did not include no-thru traffic details. This adds layers reusing the existing colors from the permission layer.

The edge layers are grouped by street mode. This allows coloring all edges usable by the selected modes.

image

Issue

Fixes #6145

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 84.52381% with 13 lines in your changes missing coverage. Please review.

Project coverage is 69.94%. Comparing base (b8a3179) to head (336fb13).
Report is 7 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...nner/inspector/vector/edge/EdgePropertyMapper.java 31.25% 11 Missing ⚠️
...ipplanner/apis/vectortiles/model/StyleBuilder.java 85.71% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6146      +/-   ##
=============================================
+ Coverage      69.92%   69.94%   +0.01%     
- Complexity     17722    17738      +16     
=============================================
  Files           1996     1996              
  Lines          75394    75467      +73     
  Branches        7713     7721       +8     
=============================================
+ Hits           52720    52783      +63     
- Misses         19997    20008      +11     
+ Partials        2677     2676       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@t2gran t2gran added this to the 2.7 (next release) milestone Oct 16, 2024
@flaktack flaktack force-pushed the feature/layer-groups branch 2 times, most recently from 1bb4fc1 to b10b81d Compare October 17, 2024 13:22
+ group no-thru traffic and permission layers by mode
@flaktack flaktack marked this pull request as ready for review October 17, 2024 13:32
@flaktack flaktack requested a review from a team as a code owner October 17, 2024 13:32
@flaktack flaktack added the OTP Debug UI The OTP bundled client label Oct 17, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice to get rid of the checkboxes for all permission combinations.

I haven't looked at the vectortiles before but I think this looks good in general. I tested it out and added my thoughts.

@@ -181,9 +197,8 @@ private static List<StyleBuilder> edges(VectorSourceLayer edges) {
.group(EDGES_GROUP)
.typeLine()
.vectorSourceLayer(edges)
.lineColor(MAGENTA)
.edgeFilter(EDGES_TO_DISPLAY)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why we remove this filter?

.toList();
}

private static String permissionColors(StreetTraversalPermission p) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private static String permissionColors(StreetTraversalPermission p) {
private static String permissionColor(StreetTraversalPermission p) {

.lineColor(MAGENTA)
.edgeFilter(EDGES_TO_DISPLAY)
.lineWidth(LINE_WIDTH)
.lineColor(GRAY)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hard to see.

Comment on lines +220 to +221
.lineColor(GRAY)
.lineOpacity(0.2f)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very hard to see

public static String streetPermissionAsString(StreetTraversalPermission permission) {
return (
permission == StreetTraversalPermission.ALL
? "PEDESTRIAN_AND_BICYCLE_AND_CAR"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does add a bit of noise to the map since the labels that used to say ALL now says PEDESTRIAN BICYCLE CAR. Maybe that's ok since it's more explicit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OTP Debug UI The OTP bundled client Skip Changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add no-thru traffic details to the vector tiles
3 participants