protomaps / protomaps/basemaps

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

Open
#633 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
740
Forks
104
Avg merge
26m
Merged PRs (30d)
2

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.