Expand description
Flat OpenStreetMap (OSM) data format providing an efficient random data access through memory mapped files.
The data format is described and implemented in flatdata. The schema describes the fundamental OSM data structures: nodes, ways, relations and tags as simple non-nested data structures. The relations between these are expressed through indexes.
§Examples
Open a flatdata archive (compiled from pbf with osmflatc
) and iterate
through nodes:
use osmflat::{FileResourceStorage, Osm};
fn main() {
let storage = FileResourceStorage::new("path/to/archive.osm.flatdata");
let archive = Osm::open(storage).unwrap();
for node in archive.nodes().iter() {
println!("{:?}", node);
}
}
For more examples, see the examples directory.
Re-exports§
pub use crate::osm::*;
Modules§
Structs§
- File
Resource Storage - Resource storage on disk using memory mapped files.
Functions§
- find_
tag - Finds a tag by its key in the given
range
and returns the corresponding value. - find_
tag_ by - Finds the first tag in the given
range
which satisfies the predicate applied to the key and value and returns the corresponding value. - has_tag
- Checks if there is a tag in
range
with a givenkey
andvalue
. - iter_
tags - Returns an iterator over tags specified by
range
.