Country labels silently fall back to default zooms when the Wikidata join fails

未关闭
#633 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
56/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java
领域
data

调研方向

Start in tiles/src/main/java/com/protomaps/basemap/layers/Places.java, especially Places.getZoomsPops(), and compare its behavior with the curated entries in tiles/src/main/resources/places.csv. Inspect how place=country features are handled when wikidata is absent, using the affected country examples and hosted tile details as a reproduction reference. Done means the missing Wikidata join no longer silently removes the intended low-zoom country labeling.

由索引模型根据 Issue 内容生成。

描述

Location

https://xue.ringsaturn.me/?model=gfs&type=precip#map=1.65/28/128

Screenshots

Image Image

Required information

  • Browser: Safari&Chrome
  • Renderer version: MapLibre GL JS 5.24.0
  • Tileset version and source: hosted Protomaps API, v4
  • Style JSON or NPM version

The basemap generator uses the OSM wikidata tag to join place features with the curated zoom configuration in places.csv.

When a place=country feature temporarily loses its wikidata tag, Places.getZoomsPops() silently skips the curated configuration and retains the default zoom values. This can remove major country labels from low-zoom tiles without producing a visible build error or warning.

This occurred in an OSM data incident affecting five country nodes. The missing tags have since been restored upstream, but the currently hosted Protomaps v4 tiles still demonstrate the failure mode.

The current code only applies a curated configuration when the feature contains a matching Wikidata ID:

https://github.com/protomaps/basemaps/blob/a50c699adc60a45c899971b1e11275e61f13bfbf/tiles/src/main/java/com/protomaps/basemap/layers/Places.java#L401-L426
China has this entry in places.csv:

Q148,1,5,-1

https://github.com/protomaps/basemaps/blob/a50c699adc60a45c899971b1e11275e61f13bfbf/tiles/src/main/resources/places.csv#L42

However, in the currently hosted v4 tiles:

  • China is absent from the places layer in the relevant z1 tile.
  • The China feature in tile z5/25/12 has kind=country.
  • It has min_zoom=6.
  • It has no wikidata property.

The feature therefore behaves as if the curated Q148 entry did not exist.

List of affected counties:

Country OSM node Wikidata ID Curated zoom range
China 424313582 Q148 z1-z5
Bangladesh 432424937 Q902 z2-z7
Bhutan 424311028 Q917 z3-z8
United Arab Emirates 424310703 Q878 z3-z8
South Africa 424298167 Q258 z1-z6

Upstream status:

The OSM community investigated the incident here:

https://community.openstreetmap.org/t/146752

The five missing Wikidata tags were restored on 2026-08-24:

主要语言
Java
星标
779
派生
111
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

protomaps/basemaps 的其他 Issue

查看 protomaps/basemaps 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。