[][src]Struct vadeen_osm::Osm

pub struct Osm {
    pub boundary: Option<Boundary>,
    pub nodes: Vec<Node>,
    pub ways: Vec<Way>,
    pub relations: Vec<Relation>,
    // some fields omitted
}

Abstract representation of an OSM map.

An OSM map contains a boundary, nodes, ways and relations. See the OSM documentation over ['Elements'] for an overview of what each element represents.

The osm (xml) and o5m formats have a very similar structure which corresponds to this struct.

To build an OSM map, you probably want to read it from file (see osm_io) or use the OsmBuilder.

Fields

boundary: Option<Boundary>nodes: Vec<Node>ways: Vec<Way>relations: Vec<Relation>

Methods

impl Osm[src]

pub fn add_node(&mut self, node: Node)[src]

Add a node to the map, the boundary is expanded to include the node.

pub fn add_way(&mut self, way: Way)[src]

Add a way to the map.

pub fn add_relation(&mut self, relation: Relation)[src]

pub fn find_node_id(&mut self, coordinate: Coordinate) -> Option<i64>[src]

Find node id in an osm map by coordinate.

Trait Implementations

impl Debug for Osm[src]

impl Default for Osm[src]

Auto Trait Implementations

impl RefUnwindSafe for Osm

impl Send for Osm

impl Sync for Osm

impl Unpin for Osm

impl UnwindSafe for Osm

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.