public-lands: filter "Unknown <agency>" PAD-US label artifacts

PAD-US v4.0 ships many small sub-polygons whose unit_nm is literally
"Unknown <state agency>" (e.g. "Unknown Idaho Department of Lands"). The
PMTiles build maps unit_nm -> feature name, so the label layer rendered
these spurious labels next to/over the legitimate umbrella label.

Filter them out at the PUBLIC_LANDS_LABEL (symbol) layer only via a name
prefix test. Fill and line layers are untouched — the polygon geometry
still renders, just without the bogus label.

Evidence: /api/landclass at (42.619853, -114.462106) returns a 12-acre
"Unknown Idaho Department of Lands" overlapping the 1.98M-acre
"Idaho Department of Lands" umbrella.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt 2026-05-20 17:03:35 +00:00
commit 41ea028d48

View file

@ -528,6 +528,8 @@ function addPublicLands(map, themeId) {
type: 'symbol', type: 'symbol',
source: PUBLIC_LANDS_SOURCE, source: PUBLIC_LANDS_SOURCE,
'source-layer': 'public_lands', 'source-layer': 'public_lands',
// Exclude PAD-US sub-polygons whose unit_nm is "Unknown <agency>" USGS source artifact, not real label.
filter: ['!', ['==', ['slice', ['coalesce', ['get', 'name'], ''], 0, 8], 'Unknown ']],
minzoom: 10, minzoom: 10,
layout: { layout: {
'text-field': ['get', 'name'], 'text-field': ['get', 'name'],