feat: add maxspeed to transport layer

This commit is contained in:
2025-10-20 17:51:50 +02:00
parent ef230ca65f
commit 84f29a785a
2 changed files with 2 additions and 1 deletions

View File

@@ -497,6 +497,7 @@ public class Transportation implements
.setAttr(Fields.CLASS, highwayClass) .setAttr(Fields.CLASS, highwayClass)
.setAttr(Fields.SUBCLASS, highwaySubclass(highwayClass, element.publicTransport(), highway)) .setAttr(Fields.SUBCLASS, highwaySubclass(highwayClass, element.publicTransport(), highway))
.setAttr(Fields.NETWORK, networkType != null ? networkType.name : null) .setAttr(Fields.NETWORK, networkType != null ? networkType.name : null)
.setAttr("maxspeed", element.source().getTag("maxspeed"))
.setAttrWithMinSize(Fields.BRUNNEL, brunnel(element.isBridge(), element.isTunnel(), element.isFord()), 4, 4, 12) .setAttrWithMinSize(Fields.BRUNNEL, brunnel(element.isBridge(), element.isTunnel(), element.isFord()), 4, 4, 12)
// z8+ // z8+
.setAttrWithMinzoom(Fields.EXPRESSWAY, expressway ? 1 : null, 8) .setAttrWithMinzoom(Fields.EXPRESSWAY, expressway ? 1 : null, 8)

View File

@@ -201,7 +201,7 @@ class OpenMapTilesTest {
), 14, 828, LineString.class); ), 14, 828, LineString.class);
assertNumFeatures("transportation", Map.of( assertNumFeatures("transportation", Map.of(
"class", "primary" "class", "primary"
), 14, 249, LineString.class); ), 14, 262, LineString.class);
} }
@Test @Test