Skip to content

Promote / demote US roads #423

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tiles/src/main/java/com/protomaps/basemap/layers/Roads.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,20 @@ public Roads(CountryCoder countryCoder) {
trunk
trunk_link
"""),
use("minZoom", 7)
use("minZoom", 7),
use("kind", "major_road")
),
rule(
with("_country", "US"),
with("_r_network_US:US"),
use("minZoom", 6)
use("minZoom", 6),
use("kind", "major_road")
),
rule(
with("_country", "US"),
with("_r_network_US:I"),
use("minZoom", 3)
use("minZoom", 3),
use("kind", "highway")
)
)).index();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void testHighways(String highway, String kind, String kindDetail, int genericMin

// US
assertFeatures(12,
List.of(Map.of("kind", kind,
List.of(Map.of("kind", highway.startsWith("motorway") ? "major_road" : kind,
"kind_detail", kindDetail,
"_minzoom", usMinZoom
)),
Expand All @@ -213,7 +213,7 @@ void testHighways(String highway, String kind, String kindDetail, int genericMin

// US with relation US:US
assertFeatures(12,
List.of(Map.of("kind", kind,
List.of(Map.of("kind", "major_road",
"kind_detail", kindDetail,
"_minzoom", 6
)),
Expand All @@ -225,7 +225,7 @@ void testHighways(String highway, String kind, String kindDetail, int genericMin

// US with relation US:I
assertFeatures(12,
List.of(Map.of("kind", kind,
List.of(Map.of("kind", "highway",
"kind_detail", kindDetail,
"_minzoom", 3
)),
Expand Down
Loading