Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
pbf-craft
A Rust library for reading and writing OpenSteetMap PBF file format.
It contains a variety of PBF readers for a variety of scenarios. For example, a PBF reader with an index can locate and read elements more efficiently. It also provides a PBF writer that can write PBF data to a file.
Since this crate uses the btree_cursors feature, it requires you to use the nightly version of rust.
- Written in pure Rust
- Provides an indexing feature to the PBF to greatly improve read performance.
Usage
Add this to your Cargo.toml:
[]
= "0.9"
Reading a PBF file:
use PbfReader;
let mut reader = from_path.unwrap;
reader.read.unwrap;
Finding an element using the index feature. IndexedReader creates an index file for the PBF file, which allows you to quickly locate and retrieve an element when looking for it using its ID. IndexedReader has an cache option, with which you can fetch a element with its dependencies more efficiently.
use ElementType;
use IndexedReader;
let mut indexed_reader = from_path_with_cache.unwrap;
let node = indexed_reader.find.unwrap;
let element_list = indexed_reader.get_with_deps.unwrap;
Writing a PBF file:
use ;
use PbfWriter;
let mut writer = from_path.unwrap;
writer.write.unwrap;
writer.finish.unwrap;