Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosm-project/rosm_pbf_reader
Low-level OSM PBF reader, written in Rust
https://github.com/rosm-project/rosm_pbf_reader
openstreetmap osm pbf protobuf rust
Last synced: 16 days ago
JSON representation
Low-level OSM PBF reader, written in Rust
- Host: GitHub
- URL: https://github.com/rosm-project/rosm_pbf_reader
- Owner: rosm-project
- License: mit
- Created: 2020-04-11T12:13:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-31T11:45:20.000Z (9 months ago)
- Last Synced: 2024-12-03T01:31:14.898Z (21 days ago)
- Topics: openstreetmap, osm, pbf, protobuf, rust
- Language: Rust
- Homepage:
- Size: 65.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# rosm_pbf_reader
[![Crates.io](https://img.shields.io/crates/v/rosm_pbf_reader.svg?label=rosm_pbf_reader)](https://crates.io/crates/rosm_pbf_reader)
[![Docs.rs](https://docs.rs/rosm_pbf_reader/badge.svg)](https://docs.rs/rosm_pbf_reader)
[![Build Status](https://github.com/yzsolt/rosm_pbf_reader/workflows/continuous-integration/badge.svg)](https://github.com/yzsolt/rosm_pbf_reader/actions)A low-level Rust library for parsing OpenStreetMap data in [PBF format](https://wiki.openstreetmap.org/wiki/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`](https://crates.io/crates/flate2) is enabled by default. See Cargo's [default feature documentation](https://doc.rust-lang.org/cargo/reference/features.html#the-default-feature) 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
- [osmpbfreader-rs](https://github.com/TeXitoi/osmpbfreader-rs)
- [osmpbf](https://github.com/b-r-u/osmpbf)