[][src]Struct osmgraphing::Parser

pub struct Parser;

The parser parsing *.osm.pbf- and *.fmi-files into a graphbuilder or a graph.

The filter-pipeline

  1. Download raw osm-data (see README)
  2. Read in this data
  3. Filter and process osm-components like nodes and edges, e.g. filtering via tags
  4. Create a memory- and runtime-efficient routing-graph.

Nodes

  • Coordinates: Nodes have coordinates given in (latitude, longitude).
  • Height: Nodes have a height, which is ignored right now.

Edges

Every edge will have a street-type with respective default speed-limit. These defaults depend on the street-network and can be found in the respective module network.

Additional information

This pbf-parser uses osmpbfreader-rs. An own implementation would need the pbf-impl of rust, but the previously mentioned osmpbfreader works well. *.osm-xml-files are not supported, but could be read with quick-xml.

Other libraries processing openstreetmap-data can be found in the osm-wiki.

Methods

impl Parser[src]

pub fn parse<P: AsRef<Path> + ?Sized>(path: &P) -> Result<GraphBuilder, String>[src]

pub fn parse_and_finalize<P: AsRef<Path> + ?Sized>(
    path: &P
) -> Result<Graph, String>
[src]

Auto Trait Implementations

impl RefUnwindSafe for Parser

impl Send for Parser

impl Sync for Parser

impl Unpin for Parser

impl UnwindSafe for Parser

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.