Fix service/man_made npe (#72)

pull/75/head
Michael Barry 2022-02-07 20:41:02 -05:00 zatwierdzone przez GitHub
rodzic e3a47ad4b2
commit a6b0072eca
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 19 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

@ -497,6 +497,24 @@ public class TransportationTest extends AbstractLayerTest {
))));
}
@Test
public void testIgnoreManMadeWhenNotBridgeOrPier() {
// https://github.com/onthegomap/planetiler/issues/69
assertFeatures(14, List.of(), process(lineFeature(Map.of(
"man_made", "storage_tank",
"service", "driveway"
))));
assertFeatures(14, List.of(), process(lineFeature(Map.of(
"man_made", "courtyard",
"service", "driveway"
))));
assertFeatures(14, List.of(), process(lineFeature(Map.of(
"man_made", "courtyard",
"service", "driveway",
"name", "Named Driveway"
))));
}
@Test
public void testRaceway() {
assertFeatures(13, List.of(Map.of(