Struct osmpbf::elements::Node [−][src]
pub struct Node<'a> { /* fields omitted */ }
Expand description
An OpenStreetMap node element (See OSM wiki).
Implementations
Returns the node id. It should be unique between nodes and might be negative to indicate that the element has not yet been uploaded to a server.
Returns an iterator over the tags of this node (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::Node(node) = element {
for (key, value) in node.tags() {
println!("key: {}, value: {}", key, value);
}
}
})?;
Returns the latitude coordinate in decimicrodegrees (10⁻⁷).
Returns the longitude coordinate in decimicrodegrees (10⁻⁷).
Returns an iterator over the tags of this node
(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 Node<'a>
impl<'a> UnwindSafe for Node<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more