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 bc9d13af..1c6bc4e0 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -501,9 +501,7 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { // Assign outputFeature if (hasNamedPolygon) { - outputFeature = features.pointOnSurface(this.name()) - //.setAttr("area_debug", wayArea) // DEBUG - .setAttr("elevation", sf.getString("ele")); + outputFeature = features.pointOnSurface(this.name()); } else if (sf.isPoint()) { outputFeature = features.point(this.name()); } else { @@ -525,7 +523,8 @@ public void processOsm(SourceFeature sf, FeatureCollector features) { .setZoomRange(Math.min(minZoom, 15), 15) // 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")); + .setAttr("iata", sf.getString("iata")) + .setAttr("elevation", sf.getString("ele")); // Core Tilezen schema properties if (!kindDetail.equals("pm:undefined")) 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 7ea79337..79d14214 100644 --- a/tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java +++ b/tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java @@ -197,6 +197,17 @@ void zoom_14_peak() { ))); } + @Test + void peakElevation() { + assertFeatures(14, + List.of(Map.of("kind", "peak", "min_zoom", 14, "elevation", "569")), + process(SimpleFeature.create( + newPoint(1, 1), + new HashMap<>(Map.of("natural", "peak", "ele", "569")), + "osm", null, 0 + ))); + } + @Test void zoom_14_golfCourse() { assertFeatures(14,