Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions tiles/src/main/java/com/protomaps/basemap/layers/Pois.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"))
Expand Down
11 changes: 11 additions & 0 deletions tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down