Fix oneway logic (#70)

This commit is contained in:
Michael Barry
2023-02-06 05:48:51 -05:00
committed by GitHub
parent 0a27d5b309
commit 30538c6706
3 changed files with 11 additions and 2 deletions

View File

@@ -986,6 +986,15 @@ class TransportationTest extends AbstractLayerTest {
testDoesNotMergeLinestrings(Map.of("class", "motorway", "oneway", -1), layer, 10, 14);
}
@Test
void testMergesDisconnectedRoadFeaturesUnlessOnewayLong() throws GeometryException {
String layer = Transportation.LAYER_NAME;
testMergesLinestrings(Map.of("class", "motorway", "oneway", 0L), layer, 10, 14);
testMergesLinestrings(Map.of("class", "motorway"), layer, 10, 14);
testDoesNotMergeLinestrings(Map.of("class", "motorway", "oneway", 1L), layer, 10, 14);
testDoesNotMergeLinestrings(Map.of("class", "motorway", "oneway", -1L), layer, 10, 14);
}
@Test
void testLightRail() {
assertFeatures(13, List.of(Map.of(