Module osm.view.tag
Format-independent borrowed OpenStreetMap tags and lookup algorithms.
A tag is exposed as its exact key and value byte sequences. Codec-specific lookup state such as OSMPBF StringTable IDs does not cross this semantic boundary. No normalization, repair, transcoding, or allocation is performed.
Both byte slices are borrowed and must not outlive the backing storage owned by the reader or representation that produced the view.
The lookup helpers in this module accept osm-d semantic tag cursors whose
front value exposes exact byte key and value slices. This deliberately
includes both Phobos-compatible store InputRanges and the tighter
callback-scoped PBF cursors. Helpers consume only a copy of the supplied
cursor, so querying a borrowed tag range does not advance the caller.
Date
2026-11-01
Functions
| Name | Description |
|---|---|
findTag(tags, key)
|
Find the first tag with exactly matching key bytes. |
hasTag(tags, key)
|
Return whether any tag has exactly matching key bytes. |
tagEquals(tags, key, value)
|
Return whether any tag exactly matches both key and value. |
Structs
| Name | Description |
|---|---|
TagLookupResult
|
Result of an exact tag-key lookup. |
TagView
|
One borrowed semantic OSM tag. |