Crate rosm_pbf_reader

Source
Expand description

A low-level library for parsing OSM data in PBF format.

An OSM PBF file is a sequence of blobs. These blobs can be read with read_blob. The RawBlocks returned by read_blob can then be decompressed and parsed by BlockParser::parse_block, which returns a Block, containing either a parsed header/primitive block or an unknown block’s binary data.

The library also provides utilities for reading densely or delta encoded data in these blocks.

Raw header and primitive block definitions (generated by Prost) are exported through the pbf module.

Modules§

dense
Helpers for reading dense nodes.
pbf
util
Various utilities, like timestamp and coordinate normalization.

Structs§

BlockParser
Parser with an internal buffer for RawBlocks.
DefaultDecompressor
The default blob decompressor.
DeltaValueReader
Utility for reading delta-encoded values directly, like pbf::Way::refs and pbf::Relation::memids.
RawBlock
An unparsed, possibly compressed block.
TagReader
Generalized implementation for reading normal or densely encoded tags from string tables.

Enums§

Block
Result of BlockParser::parse_block.
CompressionMethod
Blob compression method.
DecompressionError
Possible errors returned by Decompressor implementations.
Error
Possible errors returned by the library.

Traits§

Decompressor
Trait for custom decompression support.

Functions§

new_tag_reader
Constructs a new TagReader from key and value index slices, and a corresponding string table.
read_blob
Reads the next blob from pbf.