[−][src]Crate osmflat
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
osm |
Structs
FileResourceStorage | Resource storage on disk using memory mapped files. |
Functions
find_tag | Finds a tag by its key in the given |
find_tag_by | Finds the first tag in the given |
has_tag | Checks if there is a tag in |
iter_tags | Returns an iterator over tags specified by |