landuse: an area tagged landuse=forest + leisure=* loses its forest
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- data-engineering
Hướng nghiên cứu
Start in Landuse.java (rules around lines 77-135) and Matcher.getString to see why the last matching rule wins, then compare the tag order in Pois.java (lines 116-118 and 172). The issue offers three fixes, and the maintainers have not chosen one, so a newcomer should first ask which approach to take. Done means the chosen fix produces both the forest and the leisure result for an element tagged landuse=forest + leisure=nature_reserve.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
This is about the tileset: the landuse layer (Landuse.java).
A wood that is also a nature reserve or a park is often mapped as one OSM element with both tags, for example landuse=forest + leisure=nature_reserve. Protomaps emits one landuse polygon per element, with one kind, and the last matching rule wins (Matcher.getString walks the matches in reverse). The leisure rule comes after the landuse rule, so the polygon gets kind=nature_reserve (or park, garden, …), and nothing in the tile says the area is a forest. A style that fills forest and draws reserves as an outline shows the wood as open ground.
Which tag wins depends on which of the two wood tags the mapper used: the natural rule comes after the leisure rule, so natural=wood + leisure=nature_reserve comes out as kind=wood and loses the reserve instead.
Location
Kastanjebos in Herent, Belgium: way 134580006 (56 ha), tagged landuse=forest + leisure=nature_reserve.
In daily build 20261014 (basemaps 4.15.2), tile 14/8402/5491 has a single landuse feature there, {kind: nature_reserve, sort_rank: 189}, and no landcover layer at that zoom.
The pois label point for the same way has kind=forest and the same feature id (35184506668838), because Pois.java checks the tags in the opposite order: there landuse wins over leisure (except leisure=park, which a later rule puts back on top). So the tileset calls this area a forest in one layer and a nature reserve in the other. A style can't use the label to fill the polygon: an expression can't look up a feature in another layer, and only named areas get a label point.
Scale
In a Europe osm2pgsql import from October 2026 there are about 2,200 areas tagged landuse=forest with a leisure tag and no natural tag (672 km²). Most are parks (about 1,090), nature reserves (570) and gardens (260).
Possible fixes
- When an element matches both a cover kind (
forest,wood) and a leisure kind, emit two polygons:kind=forestandkind=nature_reserve. OpenMapTiles does the equivalent: the same way is in itslandcoverlayer (classwood) and itsparklayer (classnature_reserve). It costs a second geometry for a few thousand polygons. - Keep one polygon, and carry the cover in an attribute (for example
kind_detail=forest) so a style can fill it. Smaller tiles, but every style has to know about the attribute. - Let forest win over leisure. Simplest, but then the reserve or park is lost instead, as with
natural=woodtoday.
I'd lean towards 1. #631 is a related case of one kind per area hiding information (a marine protected area that becomes kind=park).
Areas tagged landuse=forest + natural=wetland or natural=scrub (about 65,000 and 51,000 in Europe) also lose the forest. There the natural tag says what actually grows there (an open bog, regrowth after felling), so the current result seems right to me, and I'm not proposing to change it.
For now I work around this by drawing those woods from a separate PMTiles archive built from my own OSM database.
- Ngôn ngữ chính
- Java
- Star
- 779
- Fork
- 111
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của protomaps/basemaps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
Tất cả issue của protomaps/basemaps
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
paulpacifico/shutter-encoder#485 ·
-
ci reactjs typescript web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
mhnuk2007/finsim#175 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
device-results
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
RamazanKara/nightjar#205 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: README should state that Java 25 is required to buildCó thể đã có người làm @mmartofel đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
piomin/ai-software-factory-showcase#82 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày