Handle highways with man_made=bridge (#66)

This commit is contained in:
Michael Barry
2022-02-04 07:22:31 -05:00
committed by GitHub
parent 650f68455e
commit 99d723361b
2 changed files with 12 additions and 1 deletions

View File

@@ -222,7 +222,7 @@ public class Transportation implements
"highway", coalesce(highway, ""), "highway", coalesce(highway, ""),
"public_transport", coalesce(publicTransport, ""), "public_transport", coalesce(publicTransport, ""),
"construction", coalesce(construction, "") "construction", coalesce(construction, "")
), manMade) : manMade; ), null) : manMade;
} }
static String highwaySubclass(String highwayClass, String publicTransport, String highway) { static String highwaySubclass(String highwayClass, String publicTransport, String highway) {

View File

@@ -444,6 +444,17 @@ public class TransportationTest extends AbstractLayerTest {
)))); ))));
} }
@Test
public void testBridgeConstruction() {
// https://www.openstreetmap.org/way/658335918 was returning class=bridge, should just ignore
assertFeatures(13, List.of(), process(lineFeature(Map.of(
"highway", "construction",
"construction", "bridge",
"man_made", "bridge",
"layer", "1"
))));
}
@Test @Test
public void testRaceway() { public void testRaceway() {
assertFeatures(13, List.of(Map.of( assertFeatures(13, List.of(Map.of(