fix: add way_area to water pologons/labels (#1214)

pull/1229/head
Frank Elsinga 2025-03-26 12:36:15 +01:00 zatwierdzone przez GitHub
rodzic 198f9c9ea1
commit e9c872b444
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -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: