diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Boundaries.java b/tiles/src/main/java/com/protomaps/basemap/layers/Boundaries.java index eaf3bdf2..68aad6be 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Boundaries.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Boundaries.java @@ -143,15 +143,15 @@ public void processNe(SourceFeature sf, FeatureCollector features) { var line = features.line(this.name()) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Don't label lines to reduce file size (and they aren't shown in styles anyhow) //.setAttr("name", sf.getString("name")) // Preview v4 schema (disabled) - //.setAttr("pmap:min_zoom", sf.getLong("min_zoom")) - .setAttr("pmap:min_admin_level", adminLevel) + //.setAttr("min_zoom", sf.getLong("min_zoom")) + .setAttr("min_admin_level", adminLevel) // Reduce file size at low zooms - //.setAttr("pmap:ne_id", sf.getString("ne_id")) - .setAttr("pmap:brk_a3", sf.getString("brk_a3")) + //.setAttr("ne_id", sf.getString("ne_id")) + .setAttr("brk_a3", sf.getString("brk_a3")) .setZoomRange( sf.getString("min_zoom") == null ? themeMinZoom : (int) minZoom, themeMaxZoom) @@ -161,7 +161,7 @@ public void processNe(SourceFeature sf, FeatureCollector features) { // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - line.setAttr("pmap:kind_detail", kindDetail); + line.setAttr("kind_detail", kindDetail); } if (disputed) { @@ -238,16 +238,16 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var line = features.line(this.name()) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) - .setAttr("pmap:min_admin_level", minAdminLevel.getAsInt()) + .setAttr("kind", kind) + .setAttr("min_admin_level", minAdminLevel.getAsInt()) .setMinPixelSize(0) // Preview v4 schema (disabled) - //.setAttr("pmap:min_zoom", min_zoom) + //.setAttr("min_zoom", min_zoom) .setMinZoom(themeMinZoom); // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - line.setAttr("pmap:kind_detail", kindDetail); + line.setAttr("kind_detail", kindDetail); } // Core Tilezen schema properties diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Buildings.java b/tiles/src/main/java/com/protomaps/basemap/layers/Buildings.java index 617a6880..df37de6d 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Buildings.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Buildings.java @@ -76,7 +76,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feature = features.polygon(this.name()) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Core OSM tags for different kinds of places .setAttrWithMinzoom("layer", Parse.parseIntOrNull(sf.getString("layer")), 13) // NOTE: Height is quantized by zoom in a post-process step @@ -85,7 +85,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { if (kind.equals("building_part")) { // We don't need to set WithMinzoom because that's implicate with the ZoomRange - feature.setAttr("pmap:kind_detail", sf.getString("building:part")); + feature.setAttr("kind_detail", sf.getString("building:part")); feature.setAttr(MIN_HEIGHT_KEY, height.min_height()); } diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Earth.java b/tiles/src/main/java/com/protomaps/basemap/layers/Earth.java index 8b8857f1..3ee59420 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Earth.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Earth.java @@ -16,16 +16,16 @@ public String name() { public void processPreparedOsm(SourceFeature ignoredSf, FeatureCollector features) { features.polygon(this.name()) - .setAttr("pmap:kind", "earth") + .setAttr("kind", "earth") .setZoomRange(6, 15).setBufferPixels(8); } public void processNe(SourceFeature sf, FeatureCollector features) { var sourceLayer = sf.getSourceLayer(); if (sourceLayer.equals("ne_50m_land")) { - features.polygon(this.name()).setZoomRange(0, 4).setBufferPixels(8).setAttr("pmap:kind", "earth"); + features.polygon(this.name()).setZoomRange(0, 4).setBufferPixels(8).setAttr("kind", "earth"); } else if (sourceLayer.equals("ne_10m_land")) { - features.polygon(this.name()).setZoomRange(5, 5).setBufferPixels(8).setAttr("pmap:kind", "earth"); + features.polygon(this.name()).setZoomRange(5, 5).setBufferPixels(8).setAttr("kind", "earth"); } } diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java b/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java index b9a2f0b3..6f8a6183 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java @@ -26,7 +26,7 @@ public void processLandcover(SourceFeature sf, FeatureCollector features) { features.polygon(this.name()) .setId(FeatureId.create(sf)) - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) .setZoomRange(0, 7) .setSortKey(sortKey) .setMinPixelSize(0.0); 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 c4b2bfef..6031f67d 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Landuse.java @@ -152,7 +152,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { features.polygon(this.name()) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // NOTE: (nvkelso 20230622) Consider zoom 5 instead... // But to match Protomaps v2 we do earlier .setZoomRange(2, 15) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Natural.java b/tiles/src/main/java/com/protomaps/basemap/layers/Natural.java index 371e6d02..24af4682 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Natural.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Natural.java @@ -30,7 +30,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { features.polygon(this.name()) //.setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // NOTE: (nvkelso 20230622) Consider zoom 5 instead... // But to match Protomaps v2 we do earlier .setZoomRange(2, 15) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalLine.java b/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalLine.java index 4e53756d..281d17fb 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalLine.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalLine.java @@ -33,9 +33,9 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feat = features.line(this.name()) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Used for client-side label collisions - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("min_zoom", minZoom + 1) // Add less common core Tilezen attributes only at higher zooms (will continue to v4) //.setAttrWithMinzoom("bridge", sf.getString("bridge"), 12) //.setAttrWithMinzoom("tunnel", sf.getString("tunnel"), 12) @@ -51,13 +51,13 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Because of MapLibre performance and draw order limitations, generally the boolean is sufficient // See also: "layer" for more complicated ±6 layering for more sophisticated graphics libraries if (sf.hasTag("bridge") && !sf.hasTag("bridge", "no")) { - feat.setAttr("pmap:level", 1); + feat.setAttr("level", 1); } else if (sf.hasTag("tunnel") && !sf.hasTag("tunnel", "no")) { - feat.setAttr("pmap:level", -1); + feat.setAttr("level", -1); } else if (sf.hasTag("layer", "-6", "-5", "-4", "-3", "-2", "-1")) { - feat.setAttr("pmap:level", -1); + feat.setAttr("level", -1); } else { - feat.setAttr("pmap:level", 0); + feat.setAttr("level", 0); } // Server sort features so client label collisions are pre-sorted diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalPoint.java b/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalPoint.java index d14b0691..84544bd5 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalPoint.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/PhysicalPoint.java @@ -51,8 +51,8 @@ public void processNe(SourceFeature sf, FeatureCollector features) { if (!kind.isEmpty() && sf.hasTag("min_label") && sf.hasTag("name") && sf.getTag("name") != null) { var waterLabelPosition = features.pointOnSurface(this.name()) - .setAttr("pmap:kind", kind) - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("kind", kind) + .setAttr("min_zoom", minZoom + 1) .setZoomRange(sf.getString("min_label") == null ? themeMinZoom : (int) Double.parseDouble(sf.getString("min_label")) + 1, themeMaxZoom) .setBufferPixels(128); @@ -88,9 +88,9 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feat = features.point(this.name()) .setId(FeatureId.create(sf)) - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Used for client-side label collisions - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("min_zoom", minZoom + 1) .setAttr("place", sf.getString("place")) .setAttr("natural", sf.getString("natural")) .setAttr("ele", sf.getString("ele")) @@ -181,12 +181,12 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var waterLabelPosition = features.pointOnSurface(this.name()) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) - .setAttr("pmap:kind_detail", kindDetail) + .setAttr("kind", kind) + .setAttr("kind_detail", kindDetail) // While other layers don't need min_zoom, physical point labels do for more // predictable client-side label collisions // 512 px zooms versus 256 px logical zooms - .setAttr("pmap:min_zoom", nameMinZoom + 1) + .setAttr("min_zoom", nameMinZoom + 1) // Add less common core Tilezen attributes only at higher zooms (will continue to v4) .setAttrWithMinzoom("bridge", sf.getString("bridge"), 12) .setAttrWithMinzoom("tunnel", sf.getString("tunnel"), 12) @@ -196,7 +196,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Add less common core Tilezen attributes only at higher zooms (will continue to v4) if (!kindDetail.isEmpty()) { - waterLabelPosition.setAttr("pmap:kind_detail", kindDetail); + waterLabelPosition.setAttr("kind_detail", kindDetail); } if (sf.hasTag("water", "reservoir") || reservoir) { waterLabelPosition.setAttr("reservoir", true); diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Places.java b/tiles/src/main/java/com/protomaps/basemap/layers/Places.java index 342cf5c8..93b89a1f 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Places.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Places.java @@ -268,13 +268,13 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feat = features.point(this.name()) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) - .setAttr("pmap:kind_detail", place) - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("kind", kind) + .setAttr("kind_detail", place) + .setAttr("min_zoom", minZoom + 1) // Core OSM tags for different kinds of places .setAttr("capital", sf.getString("capital")) .setAttr("population", population) - .setAttr("pmap:population_rank", populationRank) + .setAttr("population_rank", populationRank) // Generally we use NE and low zooms, and OSM at high zooms // With exceptions for country and region labels .setZoomRange((int) minZoom, (int) maxZoom); diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index 8cf85d91..cf4b177a 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -441,13 +441,13 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // (there is no merging of POIs like with lines and polygons in other layers) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // While other layers don't need min_zoom, POIs do for more predictable client-side label collisions // 512 px zooms versus 256 px logical zooms - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("min_zoom", minZoom + 1) // // DEBUG - //.setAttr("pmap:area_debug", wayArea) + //.setAttr("area_debug", wayArea) // // Core OSM tags for different kinds of places // Special airport only tag (to indicate if it's an airport with regular commercial flights) @@ -459,7 +459,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - polyLabelPosition.setAttr("pmap:kind_detail", kindDetail); + polyLabelPosition.setAttr("kind_detail", kindDetail); } OsmNames.setOsmNames(polyLabelPosition, sf, 0); @@ -482,10 +482,10 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // (there is no merging of POIs like with lines and polygons in other layers) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // While other layers don't need min_zoom, POIs do for more predictable client-side label collisions // 512 px zooms versus 256 px logical zooms - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("min_zoom", minZoom + 1) // Core OSM tags for different kinds of places // Special airport only tag (to indicate if it's an airport with regular commercial flights) .setAttr("iata", sf.getString("iata")) @@ -494,7 +494,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - pointFeature.setAttr("pmap:kind_detail", kindDetail); + pointFeature.setAttr("kind_detail", kindDetail); } OsmNames.setOsmNames(pointFeature, sf, 0); @@ -510,7 +510,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { sf.hasTag("historic", "landmark", "wayside_cross") || sf.hasTag("leisure", "dog_park", "firepit", "fishing", "pitch", "playground", "slipway", "swimming_area") || sf.hasTag("tourism", "alpine_hut", "information", "picnic_site", "viewpoint", "wilderness_hut"))) { - pointFeature.setAttr("pmap:min_zoom", 17); + pointFeature.setAttr("min_zoom", 17); } if (sf.hasTag("amenity", "clinic", "dentist", "doctors", "social_facility", "baby_hatch", "childcare", @@ -527,7 +527,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { "travel_agency") || sf.hasTag("tourism", "artwork", "hanami", "trail_riding_station", "bed_and_breakfast", "chalet", "guest_house", "hostel")) { - pointFeature.setAttr("pmap:min_zoom", 17); + pointFeature.setAttr("min_zoom", 17); } // Server sort features so client label collisions are pre-sorted @@ -548,7 +548,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { @Override public List postProcess(int zoom, List items) throws GeometryException { - // TODO: (nvkelso 20230623) Consider adding a "pmap:rank" here for POIs, like for Places + // TODO: (nvkelso 20230623) Consider adding a "rank" here for POIs, like for Places return items; } diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java b/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java index ddc407ef..e75962b9 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java @@ -135,9 +135,9 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feat = features.line("roads") .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // To power better client label collisions - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("min_zoom", minZoom + 1) .setAttrWithMinzoom("ref", shield.text(), minZoomShieldText) .setAttrWithMinzoom("shield_text_length", shieldTextLength, minZoomShieldText) .setAttrWithMinzoom("network", shield.network(), minZoomShieldText) @@ -152,9 +152,9 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - feat.setAttr("pmap:kind_detail", kindDetail); + feat.setAttr("kind_detail", kindDetail); } else { - feat.setAttr("pmap:kind_detail", highway); + feat.setAttr("kind_detail", highway); } // Core OSM tags for different kinds of places @@ -164,18 +164,18 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { if (sf.hasTag("highway", "motorway_link", "trunk_link", "primary_link", "secondary_link", "tertiary_link")) { - feat.setAttr("pmap:link", 1); + feat.setAttr("link", 1); } // Set "brunnel" (bridge / tunnel) property where "level" = 1 is a bridge, 0 is ground level, and -1 is a tunnel // Because of MapLibre performance and draw order limitations, generally the boolean is sufficent // See also: "layer" for more complicated ±6 layering for more sophisticated graphics libraries if (sf.hasTag("bridge") && !sf.hasTag("bridge", "no")) { - feat.setAttrWithMinzoom("pmap:level", 1, 12); + feat.setAttrWithMinzoom("level", 1, 12); } else if (sf.hasTag("tunnel") && !sf.hasTag("tunnel", "no")) { - feat.setAttrWithMinzoom("pmap:level", -1, 12); + feat.setAttrWithMinzoom("level", -1, 12); } else { - feat.setAttrWithMinzoom("pmap:level", 0, 12); + feat.setAttrWithMinzoom("level", 0, 12); } // Server sort features so client label collisions are pre-sorted @@ -198,8 +198,8 @@ public List postProcess(int zoom, List i for (var item : items) { item.attrs().remove("highway"); - if (!item.attrs().containsKey("pmap:level")) { - item.attrs().put("pmap:level", 0); + if (!item.attrs().containsKey("level")) { + item.attrs().put("level", 0); } } diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Transit.java b/tiles/src/main/java/com/protomaps/basemap/layers/Transit.java index c2ad125e..2ff1e0b4 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Transit.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Transit.java @@ -77,9 +77,9 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feature = features.line(this.name()) .setId(FeatureId.create(sf)) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Used for client-side label collisions - .setAttr("pmap:min_zoom", minZoom + 1) + .setAttr("min_zoom", minZoom + 1) // Core OSM tags for different kinds of places .setAttr("layer", Parse.parseIntOrNull(sf.getString("layer"))) .setAttr("network", sf.getString("network")) @@ -90,18 +90,18 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - feature.setAttr("pmap:kind_detail", kindDetail); + feature.setAttr("kind_detail", kindDetail); } // Set "brunnel" (bridge / tunnel) property where "level" = 1 is a bridge, 0 is ground level, and -1 is a tunnel // Because of MapLibre performance and draw order limitations, generally the boolean is sufficent // See also: "layer" for more complicated ±6 layering for more sophisticated graphics libraries if (sf.hasTag("bridge") && !sf.hasTag("bridge", "no")) { - feature.setAttr("pmap:level", 1); + feature.setAttr("level", 1); } else if (sf.hasTag("tunnel") && !sf.hasTag("tunnel", "no")) { - feature.setAttr("pmap:level", -1); + feature.setAttr("level", -1); } else { - feature.setAttr("pmap:level", 0); + feature.setAttr("level", 0); } // Too many small pier lines otherwise diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Water.java b/tiles/src/main/java/com/protomaps/basemap/layers/Water.java index eb6f9726..e811b3c3 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Water.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Water.java @@ -18,7 +18,7 @@ public String name() { public void processPreparedOsm(SourceFeature ignoredSf, FeatureCollector features) { features.polygon(this.name()) - .setAttr("pmap:kind", "water") + .setAttr("kind", "water") .setZoomRange(6, 15).setBufferPixels(8); } @@ -66,9 +66,9 @@ public void processNe(SourceFeature sf, FeatureCollector features) { if (!kind.isEmpty() && sf.hasTag("min_zoom")) { features.polygon(this.name()) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Preview v4 schema (disabled) - //.setAttr("pmap:min_zoom", sf.getLong("min_zoom")) + //.setAttr("min_zoom", sf.getLong("min_zoom")) .setZoomRange( sf.getString("min_zoom") == null ? themeMinZoom : (int) Double.parseDouble(sf.getString("min_zoom")) - 1, themeMaxZoom) @@ -132,7 +132,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { var feature = features.polygon(this.name()) // Core Tilezen schema properties - .setAttr("pmap:kind", kind) + .setAttr("kind", kind) // Core OSM tags for different kinds of places // Add less common attributes only at higher zooms .setAttrWithMinzoom("bridge", sf.getString("bridge"), 12) @@ -144,7 +144,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Core Tilezen schema properties if (!kindDetail.isEmpty()) { - feature.setAttr("pmap:kind_detail", kindDetail); + feature.setAttr("kind_detail", kindDetail); } if (sf.hasTag("water", "reservoir") || reservoir) { feature.setAttr("reservoir", true); diff --git a/tiles/src/main/java/com/protomaps/basemap/names/NeNames.java b/tiles/src/main/java/com/protomaps/basemap/names/NeNames.java index 1b9ccd49..d0d6b747 100644 --- a/tiles/src/main/java/com/protomaps/basemap/names/NeNames.java +++ b/tiles/src/main/java/com/protomaps/basemap/names/NeNames.java @@ -30,11 +30,11 @@ public static FeatureCollector.Feature setNeNames(FeatureCollector.Feature featu feature.setAttrWithMinzoom("name", value, minZoom); if (!script.equals("Latin") && !script.equals("Generic")) { - feature.setAttrWithMinzoom("pmap:script", script, minZoom); + feature.setAttrWithMinzoom("script", script, minZoom); } String encodedValue = TextEngine.encodeRegisteredScripts(value); - feature.setAttrWithMinzoom("pmap:pgf:name", encodedValue, minZoom); + feature.setAttrWithMinzoom("pgf:name", encodedValue, minZoom); } if (key.startsWith("name:")) { @@ -42,7 +42,7 @@ public static FeatureCollector.Feature setNeNames(FeatureCollector.Feature featu if (fontRegistry.getScripts().contains(script)) { String encodedValue = TextEngine.encodeRegisteredScripts(value); - feature.setAttrWithMinzoom("pmap:pgf:" + key, encodedValue, minZoom); + feature.setAttrWithMinzoom("pgf:" + key, encodedValue, minZoom); } } } diff --git a/tiles/src/main/java/com/protomaps/basemap/names/OsmNames.java b/tiles/src/main/java/com/protomaps/basemap/names/OsmNames.java index c2ff1569..2a8ec679 100644 --- a/tiles/src/main/java/com/protomaps/basemap/names/OsmNames.java +++ b/tiles/src/main/java/com/protomaps/basemap/names/OsmNames.java @@ -84,12 +84,12 @@ public static FeatureCollector.Feature setOsmNames(FeatureCollector.Feature feat script = Script.getScript(segments.get(index)); if (!script.equals("Latin") && !script.equals("Generic")) { - feature.setAttrWithMinzoom("pmap:script", script, minZoom); + feature.setAttrWithMinzoom("script", script, minZoom); } String encodedValue = TextEngine.encodeRegisteredScripts(segments.get(index)); if (!encodedValue.equals(segments.get(index))) { - feature.setAttrWithMinzoom("pmap:pgf:name", encodedValue, minZoom); + feature.setAttrWithMinzoom("pgf:name", encodedValue, minZoom); } } if (segments.size() >= 2) { @@ -99,12 +99,12 @@ public static FeatureCollector.Feature setOsmNames(FeatureCollector.Feature feat script = Script.getScript(segments.get(index)); if (!script.equals("Latin") && !script.equals("Generic")) { - feature.setAttrWithMinzoom("pmap:script2", script, minZoom); + feature.setAttrWithMinzoom("script2", script, minZoom); } String encodedValue = TextEngine.encodeRegisteredScripts(segments.get(index)); if (!encodedValue.equals(segments.get(index))) { - feature.setAttrWithMinzoom("pmap:pgf:name2", encodedValue, minZoom); + feature.setAttrWithMinzoom("pgf:name2", encodedValue, minZoom); } } if (segments.size() >= 3) { @@ -114,12 +114,12 @@ public static FeatureCollector.Feature setOsmNames(FeatureCollector.Feature feat script = Script.getScript(segments.get(index)); if (!script.equals("Latin") && !script.equals("Generic")) { - feature.setAttrWithMinzoom("pmap:script3", script, minZoom); + feature.setAttrWithMinzoom("script3", script, minZoom); } String encodedValue = TextEngine.encodeRegisteredScripts(segments.get(index)); if (!encodedValue.equals(segments.get(index))) { - feature.setAttrWithMinzoom("pmap:pgf:name3", encodedValue, minZoom); + feature.setAttrWithMinzoom("pgf:name3", encodedValue, minZoom); } } } @@ -130,7 +130,7 @@ public static FeatureCollector.Feature setOsmNames(FeatureCollector.Feature feat if (fontRegistry.getScripts().contains(script)) { String encodedValue = TextEngine.encodeRegisteredScripts(value); if (!encodedValue.equals(value)) { - feature.setAttrWithMinzoom("pmap:pgf:" + key, encodedValue, minZoom); + feature.setAttrWithMinzoom("pgf:" + key, encodedValue, minZoom); } } } diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/BoundariesTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/BoundariesTest.java index 8e1eeb7d..c79627c4 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/BoundariesTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/BoundariesTest.java @@ -31,7 +31,7 @@ void testUntaggedWay() { profile.processFeature(way, collector); assertFeatures(12, - List.of(Map.of("pmap:kind", "country")), + List.of(Map.of("kind", "country")), collector); } diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/EarthTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/EarthTest.java index 6793c8ef..f9c13af4 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/EarthTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/EarthTest.java @@ -13,7 +13,7 @@ class EarthTest extends LayerTest { @Test void simple() { assertFeatures(15, - List.of(Map.of("pmap:kind", "earth")), + List.of(Map.of("kind", "earth")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of()), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/LandcoverTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/LandcoverTest.java index b82df44e..ca9610cc 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/LandcoverTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/LandcoverTest.java @@ -23,7 +23,7 @@ class LandcoverTest extends LayerTest { }) void simple(String daylightClassString, String expectedString, Integer expectedSortKey) { assertFeatures(7, - List.of(Map.of("pmap:kind", expectedString, "_sortkey", expectedSortKey)), + List.of(Map.of("kind", expectedString, "_sortkey", expectedSortKey)), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("class", daylightClassString)), 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 3a38a725..858e242d 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/LanduseTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/LanduseTest.java @@ -12,7 +12,7 @@ class LanduseTest extends LayerTest { @Test void simple() { assertFeatures(15, - List.of(Map.of("pmap:kind", "hospital")), + List.of(Map.of("kind", "hospital")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("amenity", "hospital")), @@ -25,7 +25,7 @@ void simple() { @Test void landuseVillageGreen() { assertFeatures(15, - List.of(Map.of("pmap:kind", "village_green")), + List.of(Map.of("kind", "village_green")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("landuse", "village_green")), @@ -38,7 +38,7 @@ void landuseVillageGreen() { @Test void landuseAllotments() { assertFeatures(15, - List.of(Map.of("pmap:kind", "allotments")), + List.of(Map.of("kind", "allotments")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("landuse", "allotments")), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/NaturalTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/NaturalTest.java index cc9b461b..a09e145f 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/NaturalTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/NaturalTest.java @@ -12,7 +12,7 @@ class NaturalTest extends LayerTest { @Test void simple() { assertFeatures(15, - List.of(Map.of("pmap:kind", "glacier")), + List.of(Map.of("kind", "glacier")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("natural", "glacier")), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalLineTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalLineTest.java index 0f607b24..00570049 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalLineTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalLineTest.java @@ -13,7 +13,7 @@ class PhysicalLineTest extends LayerTest { @Test void simple() { assertFeatures(9, - List.of(Map.of("pmap:kind", "river")), + List.of(Map.of("kind", "river")), process(SimpleFeature.create( newLineString(0, 0, 1, 1), new HashMap<>(Map.of( diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalPointTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalPointTest.java index b45ebf72..cb039cdb 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalPointTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/PhysicalPointTest.java @@ -12,7 +12,7 @@ class PhysicalPointTest extends LayerTest { @Test void simple() { assertFeatures(12, - List.of(Map.of("pmap:kind", "ocean")), + List.of(Map.of("kind", "ocean")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "ocean")), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/PlacesTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/PlacesTest.java index 65ac44c8..91303cc0 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/PlacesTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/PlacesTest.java @@ -12,7 +12,7 @@ class PlacesTest extends LayerTest { @Test void simple() { assertFeatures(12, - List.of(Map.of("pmap:kind", "neighbourhood")), + List.of(Map.of("kind", "neighbourhood")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "suburb", "name", "Whoville")), @@ -25,7 +25,7 @@ void simple() { @Test void testMinMaxLabelCountry() { assertFeatures(12, - List.of(Map.of("_minzoom", 2, "_maxzoom", 4, "pmap:kind", "country")), + List.of(Map.of("_minzoom", 2, "_maxzoom", 4, "kind", "country")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "country", "wikidata", "Q1", "name", "US")), @@ -38,7 +38,7 @@ void testMinMaxLabelCountry() { @Test void testMinMaxLabelCountryNoMatch() { assertFeatures(12, - List.of(Map.of("_minzoom", 5, "_maxzoom", 8, "pmap:kind", "country")), + List.of(Map.of("_minzoom", 5, "_maxzoom", 8, "kind", "country")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "country", "wikidata", "Q999", "name", "XX")), @@ -51,7 +51,7 @@ void testMinMaxLabelCountryNoMatch() { @Test void testMinMaxLabelRegion() { assertFeatures(12, - List.of(Map.of("_minzoom", 4, "_maxzoom", 7, "pmap:kind", "region")), + List.of(Map.of("_minzoom", 4, "_maxzoom", 7, "kind", "region")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "state", "wikidata", "Q2", "name", "CA")), @@ -64,7 +64,7 @@ void testMinMaxLabelRegion() { @Test void testMinMaxLabelRegionNoMatch() { assertFeatures(12, - List.of(Map.of("_minzoom", 8, "_maxzoom", 11, "pmap:kind", "region")), + List.of(Map.of("_minzoom", 8, "_maxzoom", 11, "kind", "region")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "state", "wikidata", "Q999", "name", "XX")), @@ -77,7 +77,7 @@ void testMinMaxLabelRegionNoMatch() { @Test void testMinMaxLabelPopulatedPlace() { assertFeatures(12, - List.of(Map.of("_minzoom", 8, "pmap:kind", "locality", "pmap:population_rank", 2)), + List.of(Map.of("_minzoom", 8, "kind", "locality", "population_rank", 2)), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "city", "wikidata", "Q3", "name", "SF")), @@ -90,7 +90,7 @@ void testMinMaxLabelPopulatedPlace() { @Test void testMinMaxLabelPopulatedPlaceNoMatch() { assertFeatures(12, - List.of(Map.of("_minzoom", 8, "pmap:kind", "locality")), + List.of(Map.of("_minzoom", 8, "kind", "locality")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("place", "city", "wikidata", "Q999", "name", "XX")), @@ -103,8 +103,8 @@ void testMinMaxLabelPopulatedPlaceNoMatch() { @Test void testLocalityPopulationOsm() { assertFeatures(13, - List.of(Map.of("pmap:kind", "locality", - "pmap:kind_detail", "locality", + List.of(Map.of("kind", "locality", + "kind_detail", "locality", "population", 1111)), process(SimpleFeature.create( newPoint(1, 1), @@ -118,8 +118,8 @@ void testLocalityPopulationOsm() { @Test void testLocalityNoPopulationOsm() { assertFeatures(14, - List.of(Map.of("pmap:kind", "locality", - "pmap:kind_detail", "locality", + List.of(Map.of("kind", "locality", + "kind_detail", "locality", "population", 1000)), process(SimpleFeature.create( newPoint(1, 1), @@ -133,8 +133,8 @@ void testLocalityNoPopulationOsm() { @Test void testHamletOsm() { assertFeatures(14, - List.of(Map.of("pmap:kind", "locality", - "pmap:kind_detail", "hamlet", + List.of(Map.of("kind", "locality", + "kind_detail", "hamlet", "population", 200)), process(SimpleFeature.create( newPoint(1, 1), @@ -148,8 +148,8 @@ void testHamletOsm() { @Test void testIsolatedDwellingOsm() { assertFeatures(14, - List.of(Map.of("pmap:kind", "locality", - "pmap:kind_detail", "isolated_dwelling", + List.of(Map.of("kind", "locality", + "kind_detail", "isolated_dwelling", "population", 100)), process(SimpleFeature.create( newPoint(1, 1), @@ -163,8 +163,8 @@ void testIsolatedDwellingOsm() { @Test void testFarmOsm() { assertFeatures(14, - List.of(Map.of("pmap:kind", "locality", - "pmap:kind_detail", "farm", + List.of(Map.of("kind", "locality", + "kind_detail", "farm", "population", 50)), process(SimpleFeature.create( newPoint(1, 1), @@ -178,8 +178,8 @@ void testFarmOsm() { @Test void testAllotmentsOsm() { assertFeatures(14, - List.of(Map.of("pmap:kind", "locality", - "pmap:kind_detail", "allotments", + List.of(Map.of("kind", "locality", + "kind_detail", "allotments", "population", 1000)), process(SimpleFeature.create( newPoint(1, 1), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java index e326f1e4..bbd2563c 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java @@ -12,7 +12,7 @@ class PoisTest extends LayerTest { @Test void simple() { assertFeatures(12, - List.of(Map.of("pmap:kind", "school")), + List.of(Map.of("kind", "school")), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("amenity", "school")), @@ -25,7 +25,7 @@ void simple() { @Test void busStop() { assertFeatures(15, - List.of(Map.of("pmap:kind", "bus_stop", "pmap:min_zoom", 18)), + List.of(Map.of("kind", "bus_stop", "min_zoom", 18)), process(SimpleFeature.create( newPoint(1, 1), new HashMap<>(Map.of("highway", "bus_stop")), @@ -40,8 +40,8 @@ void allotments() { // this test shows two list elements because we're running against the whole profile, which means we're getting // results form multiple layer classes. This may mean the test breaks when other layer classes are changed. assertFeatures(15, - List.of(Map.of("pmap:kind", "allotments"), - Map.of("pmap:kind", "allotments", "pmap:min_zoom", 16, "name", "Kleingartenverein Kartoffel")), + List.of(Map.of("kind", "allotments"), + Map.of("kind", "allotments", "min_zoom", 16, "name", "Kleingartenverein Kartoffel")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 1, 0, 0, 0), new HashMap<>(Map.of("landuse", "allotments", "name", "Kleingartenverein Kartoffel")), @@ -54,8 +54,8 @@ void allotments() { @Test void villageGreen() { assertFeatures(15, - List.of(Map.of("pmap:kind", "village_green"), - Map.of("pmap:kind", "village_green", "pmap:min_zoom", 8, "name", "Stadtpark Eiche")), + List.of(Map.of("kind", "village_green"), + Map.of("kind", "village_green", "min_zoom", 8, "name", "Stadtpark Eiche")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 1, 0, 0, 0), new HashMap<>(Map.of("landuse", "village_green", "name", "Stadtpark Eiche")), @@ -68,8 +68,8 @@ void villageGreen() { @Test void playground() { assertFeatures(15, - List.of(Map.of("pmap:kind", "playground"), - Map.of("pmap:kind", "playground", "pmap:min_zoom", 18, "name", "Spielwiese")), + List.of(Map.of("kind", "playground"), + Map.of("kind", "playground", "min_zoom", 18, "name", "Spielwiese")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 1, 0, 0, 0), new HashMap<>(Map.of("leisure", "playground", "name", "Spielwiese")), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/RoadsTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/RoadsTest.java index 0f6d929b..ccaa319c 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/RoadsTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/RoadsTest.java @@ -12,7 +12,7 @@ class RoadsTest extends LayerTest { @Test void simple() { assertFeatures(12, - List.of(Map.of("pmap:kind", "highway", "layer", 1, "pmap:kind_detail", "motorway", "ref", "1", "network", "US:US", + List.of(Map.of("kind", "highway", "layer", 1, "kind_detail", "motorway", "ref", "1", "network", "US:US", "shield_text_length", 1)), process(SimpleFeature.create( newLineString(0, 0, 1, 1), diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/TransitTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/TransitTest.java index 00c99a0c..8044461a 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/TransitTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/TransitTest.java @@ -13,7 +13,7 @@ class TransitTest extends LayerTest { @Test void simple() { assertFeatures(12, - List.of(Map.of("pmap:kind", "rail", "pmap:kind_detail", "service")), + List.of(Map.of("kind", "rail", "kind_detail", "service")), process(SimpleFeature.create( newLineString(0, 0, 1, 1), new HashMap<>(Map.of( @@ -28,7 +28,7 @@ void simple() { @Test void isBuilding() { assertFeatures(12, - List.of(Map.of("pmap:kind", "building")), + List.of(Map.of("kind", "building")), process(SimpleFeature.create( newPolygon(0, 0, 1, 1, 0, 1, 0, 0), new HashMap<>(Map.of( diff --git a/tiles/src/test/java/com/protomaps/basemap/layers/WaterTest.java b/tiles/src/test/java/com/protomaps/basemap/layers/WaterTest.java index 98d32a8f..2af3957a 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/WaterTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/WaterTest.java @@ -12,7 +12,7 @@ class WaterTest extends LayerTest { @Test void simple() { assertFeatures(15, - List.of(Map.of("pmap:kind", "swimming_pool")), + List.of(Map.of("kind", "swimming_pool")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("leisure", "swimming_pool")), @@ -25,7 +25,7 @@ void simple() { @Test void kindFountain() { assertFeatures(15, - List.of(Map.of("pmap:kind", "fountain")), + List.of(Map.of("kind", "fountain")), process(SimpleFeature.create( newPolygon(0, 0, 0, 1, 1, 1, 0, 0), new HashMap<>(Map.of("natural", "water", "amenity", "fountain")),