Struct osmpbf::elements::Relation [−][src]
pub struct Relation<'a> { /* fields omitted */ }
Expand description
An OpenStreetMap relation element (See OSM wiki).
A relation contains an ordered list of members that can be of any element type.
Implementations
Returns an iterator over the tags of this relation (See OSM wiki). A tag is represented as a pair of strings (key and value).
Example
use osmpbf::*;
let reader = ElementReader::from_path("tests/test.osm.pbf")?;
reader.for_each(|element| {
if let Element::Relation(relation) = element {
for (key, value) in relation.tags() {
println!("key: {}, value: {}", key, value);
}
}
})?;
pub fn members(&self) -> RelMemberIter<'a>ⓘNotable traits for RelMemberIter<'a>impl<'a> Iterator for RelMemberIter<'a> type Item = RelMember<'a>;
pub fn members(&self) -> RelMemberIter<'a>ⓘNotable traits for RelMemberIter<'a>impl<'a> Iterator for RelMemberIter<'a> type Item = RelMember<'a>;
impl<'a> Iterator for RelMemberIter<'a> type Item = RelMember<'a>;
Returns an iterator over the members of this relation.
Returns an iterator over the tags of this relation
(See OSM wiki).
A tag is represented as a pair of indices (key and value) to the stringtable of the current
PrimitiveBlock
.
Returns the raw stringtable. Elements in a PrimitiveBlock
do not store strings
themselves; instead, they just store indices to a common stringtable. By convention, the
contained strings are UTF-8 encoded but it is not safe to assume that (use
std::str::from_utf8
).
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Relation<'a>
impl<'a> UnwindSafe for Relation<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more