diff --git a/src/main/java/org/openmaptiles/layers/Boundary.java b/src/main/java/org/openmaptiles/layers/Boundary.java index a5e5d305..52ad34aa 100644 --- a/src/main/java/org/openmaptiles/layers/Boundary.java +++ b/src/main/java/org/openmaptiles/layers/Boundary.java @@ -179,8 +179,17 @@ record BoundaryInfo(int adminLevel, int minzoom, int maxzoom) {} BoundaryInfo info = switch (table) { case "ne_110m_admin_0_boundary_lines_land" -> new BoundaryInfo(2, 0, 0); case "ne_50m_admin_0_boundary_lines_land" -> new BoundaryInfo(2, 1, 3); - case "ne_10m_admin_0_boundary_lines_land" -> feature.hasTag("featurecla", "Lease limit") ? null : - new BoundaryInfo(2, 4, 4); + case "ne_10m_admin_0_boundary_lines_land" -> { + boolean isDisputedSouthSudanAndKenya = false; + if (disputed) { + String left = feature.getString("adm0_left"); + String right = feature.getString("adm0_right"); + isDisputedSouthSudanAndKenya = "South Sudan".equals(left) && "Kenya".equals(right); + } + yield isDisputedSouthSudanAndKenya ? new BoundaryInfo(2, 1, 4) : + feature.hasTag("featurecla", "Lease limit") ? null : + new BoundaryInfo(2, 4, 4); + } case "ne_10m_admin_1_states_provinces_lines" -> { Double minZoom = Parse.parseDoubleOrNull(feature.getTag("min_zoom")); yield minZoom != null && minZoom <= 7 ? new BoundaryInfo(4, 1, 4) : diff --git a/src/test/java/org/openmaptiles/layers/BoundaryTest.java b/src/test/java/org/openmaptiles/layers/BoundaryTest.java index 14138ffd..ffc539a6 100644 --- a/src/test/java/org/openmaptiles/layers/BoundaryTest.java +++ b/src/test/java/org/openmaptiles/layers/BoundaryTest.java @@ -104,6 +104,7 @@ void testNaturalEarthCountryBoundaries() { assertFeatures(0, List.of(Map.of( "_layer", "boundary", "_type", "line", + "_minzoom", 4, "admin_level", 2 )), process(SimpleFeature.create( newLineString(0, 0, 1, 1), @@ -115,6 +116,23 @@ void testNaturalEarthCountryBoundaries() { 0 ))); + assertFeatures(0, List.of(Map.of( + "_layer", "boundary", + "_type", "line", + "_minzoom", 1, + "admin_level", 2 + )), process(SimpleFeature.create( + newLineString(0, 0, 1, 1), + Map.of( + "featurecla", "Disputed (please verify)", + "adm0_left", "South Sudan", + "adm0_right", "Kenya" + ), + OpenMapTilesProfile.NATURAL_EARTH_SOURCE, + "ne_10m_admin_0_boundary_lines_land", + 0 + ))); + assertFeatures(0, List.of(), process(SimpleFeature.create( newLineString(0, 0, 1, 1), Map.of(