diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java b/tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java index 7e6fee0d..e26e80b9 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java @@ -95,13 +95,10 @@ public class Landuse implements ForwardingProfile.LayerPostProcessor { cemetery commercial grass - farmland - residential military village_green allotments forest - meadow grass """), use("kind", fromTag("landuse")) @@ -132,8 +129,6 @@ public class Landuse implements ForwardingProfile.LayerPostProcessor { grassland scrub sand - wetland - bare_rock """), use("kind", fromTag("natural")) ), @@ -167,17 +162,13 @@ public class Landuse implements ForwardingProfile.LayerPostProcessor { with("landuse", "brownfield"), use("kind", "industrial") ), - rule( - with("landuse", "farmyard", "orchard"), - use("kind", "farmland") - ), rule( with("man_made", "bridge"), use("kind", "pedestrian") ), rule( with("area:aeroway", "taxiway", "runway"), - use("kind", "other") + use("kind", fromTag("area:aeroway")) ), rule( with("place", "neighbourhood"), @@ -248,12 +239,9 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { String kind = getString(sf, matches, "kind", "other"); features.polygon(this.name()) - .setId(FeatureId.create(sf)) + .setId(1) // Core Tilezen schema properties .setAttr("kind", kind) - .setAttr("sort_rank", 189) - // NOTE: (nvkelso 20230622) Consider zoom 5 instead... - // But to match Protomaps v2 we do earlier .setZoomRange(2, 15) .setMinPixelSize(2.0); @@ -269,20 +257,6 @@ public String name() { @Override public List postProcess(int zoom, List items) throws GeometryException { - if (zoom == 15) - return items; - int minArea = 400 / (4096 * 4096) * (256 * 256); - if (zoom == 6) - minArea = 600 / (4096 * 4096) * (256 * 256); - else if (zoom <= 5) - minArea = 800 / (4096 * 4096) * (256 * 256); - items = Area.filterArea(items, minArea); - - // We only care about park boundaries inside groups of adjacent parks at higher zooms when they are labeled - // so at lower zooms we merge them to reduce file size - if (zoom <= 6) { - return FeatureMerge.mergeNearbyPolygons(items, 3.125, 3.125, 0.5, 0.5); - } - return items; + return FeatureMerge.mergeNearbyPolygons(items, 3.125, 3.125, 0.5, 0.5); } } diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/LanduseTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/LanduseTest.java index f0e0aca3..f720e753 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/LanduseTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/LanduseTest.java @@ -39,6 +39,16 @@ void testFromTagAeroway() { List.of(Map.of("kind", "runway")), processWith("aeroway", "runway") ); + + assertFeatures(15, + List.of(Map.of("kind", "runway")), + processWith("area:aeroway", "runway") + ); + + assertFeatures(15, + List.of(Map.of("kind", "taxiway")), + processWith("area:aeroway", "taxiway") + ); } @Test