diff --git a/planetiler-custommap/src/main/resources/samples/shortbread.spec.yml b/planetiler-custommap/src/main/resources/samples/shortbread.spec.yml index 69452963..c238037b 100644 --- a/planetiler-custommap/src/main/resources/samples/shortbread.spec.yml +++ b/planetiler-custommap/src/main/resources/samples/shortbread.spec.yml @@ -39,7 +39,7 @@ examples: - name: waterway=dock input: source: osm - geometry: polygon + geometry: POLYGON ((-0.5 -0.5, 0.5 -0.5, 0.5 0.5, -0.5 0.5, -0.5 -0.5)) tags: waterway: dock output: @@ -48,6 +48,11 @@ examples: min_zoom: 10 tags: kind: dock + # verified with a naive "projection" and sizes from https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616 + # 1° lat ~ 110.567km at the equator + # 1° lon ~ 111.321km at the equator + # => ~12308.429km² = ~12308.429e^6 m² = ~1.2308429e^10 m² + way_area: 1.236418893560872E10 - name: waterway=canal linestring input: diff --git a/planetiler-custommap/src/main/resources/samples/shortbread.yml b/planetiler-custommap/src/main/resources/samples/shortbread.yml index c7776bba..c4267248 100644 --- a/planetiler-custommap/src/main/resources/samples/shortbread.yml +++ b/planetiler-custommap/src/main/resources/samples/shortbread.yml @@ -63,6 +63,8 @@ layers: attributes: - key: kind type: match_value + - key: way_area # area in square meter (Mercator Projection) + value: "${ feature.area('m2') }" - id: water_polygons_labels features: @@ -80,6 +82,8 @@ layers: - *name - *name_en - *name_de + - key: way_area # area in square meter (Mercator Projection) + value: "${ feature.area('m2') }" - id: water_lines features: