[−][src]Struct vadeen_osm::Osm
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,