rosm_pbf_reader

Crates.iorosm_pbf_reader
lib.rsrosm_pbf_reader
version1.0.2
sourcesrc
created_at2023-02-11 11:37:29.416818
updated_at2024-03-31 11:45:52.162211
descriptionA low-level Rust library for parsing OpenStreetMap data in PBF format
homepage
repositoryhttps://github.com/rosm-project/rosm_pbf_reader
max_upload_size
id782462
size65,374
Zsolt Bölöny (yzsolt)

documentation

README

rosm_pbf_reader

Crates.io Docs.rs Build Status

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

This library provides the smallest possible API to work with OSM PBF files: a blob reader, a block parser and some utilities to read delta or densely encoded data. No other utilities are provided for further data processing (like filtering). There's also no built-in parallelization, however block parsing (which is the most computation-heavy part of the process) can be easily dispatched to multiple threads.

Features

Since most OSM PBFs are ZLib compressed, ZLib decompression support using flate2 is enabled by default. See Cargo's default feature documentation how to disable it.

The library provides a way for the user to support other compression methods by implementing the Decompressor trait.

Examples

  • print_header is a very simple example showing how to print the header block of an OSM PBF file.
  • count_wikidata is a more complete example showing multithreaded parsing, tag and dense node reading.

Similar projects

Commit count: 63

cargo fmt