pub fn decode_elements<'a>(
_: PrimitiveBlock,
) -> impl Iterator<Item = Result<Element, DecodeError>> + 'aExpand description
Decode a PrimitiveBlock into an Element stream
There is no dependency on order, so this can be called in parallel.
Technically, the file format is (<HeaderBlock> (<PrimitiveBlock>)+)*, but
[FileBlock::Header] and [FileBlock::Other] don’t contain any elements.
A number of hydration steps are performed:
- String table indices ==> actual strings
- Positions packed as granularity, offset, value ==> positions with Decimal
- Timestamps packed as date_granularity, value ==> timestamps with NaiveDateTime
- Dense nodes => Nodes
- Delta-encoded values => actual values
https://wiki.openstreetmap.org/wiki/PBF_Format#Encoding_OSM_entities_into_fileblocks