Resolves the geometry-type set a layer's sub-layers are built for: what the data shows,
UNION what the config declares.
🛑 A declared kind ADDS, it never restricts — and this is not a convenience. A profile
declares ONE lowercase kind, which is the layer's SEMANTIC kind (the legend, the editor's
dropdown and the theme applier all read the same field). A layer whose kind is narrower
than its content — a computed itinerary is a polyline that also carries its stops —
would lose the sub-layers a restrictive reading leaves out until its first write showed
them (growGeoJSONLayer completes a layer then) — and for good when the layer ships its
data and is never written again.
🛑 Corollary, and it is the half that is easy to get wrong: only the DATA may say
"unknown". The three-type fallback is keyed on an empty SCAN, never on the absence of a
declaration — otherwise declaring polyline on a layer that ships empty would narrow it
to lines alone, which is precisely how the itinerary's stops would stop being drawn. The
declaration's whole effect is to guarantee a sub-layer for what the boot data cannot show.
⚠️ This function accepted GeoJSON names ONLY until 27/08/2026, while the profile schema
allows nothing but the lowercase vocabulary — so no profile ever reached it. Both
vocabularies are now understood, in geometryKindToGeoJSONTypes.
Parameters
data: unknown
The layer's GeoJSON, possibly empty.
declared: unknown
The config-declared kind, in either vocabulary. A list is accepted.
Returns Set<string>
The geometry types to build sub-layers for. Never empty.
Resolves the geometry-type set a layer's sub-layers are built for: what the data shows, UNION what the config declares.
🛑 A declared kind ADDS, it never restricts — and this is not a convenience. A profile declares ONE lowercase kind, which is the layer's SEMANTIC kind (the legend, the editor's dropdown and the theme applier all read the same field). A layer whose kind is narrower than its content — a computed itinerary is a
polylinethat also carries its stops — would lose the sub-layers a restrictive reading leaves out until its first write showed them (growGeoJSONLayercompletes a layer then) — and for good when the layer ships its data and is never written again.🛑 Corollary, and it is the half that is easy to get wrong: only the DATA may say "unknown". The three-type fallback is keyed on an empty SCAN, never on the absence of a declaration — otherwise declaring
polylineon a layer that ships empty would narrow it to lines alone, which is precisely how the itinerary's stops would stop being drawn. The declaration's whole effect is to guarantee a sub-layer for what the boot data cannot show.⚠️ This function accepted GeoJSON names ONLY until 27/08/2026, while the profile schema allows nothing but the lowercase vocabulary — so no profile ever reached it. Both vocabularies are now understood, in geometryKindToGeoJSONTypes.