pub struct Relation {
pub id: u64,
/* private fields */
}Expand description
Relation class contains a collection of nodes, ways and relations as members.
Fields§
§id: u64The relation’s id
Implementations§
Source§impl Relation
impl Relation
Sourcepub fn properties(&self, pb: &PrimitiveBlock) -> Properties
pub fn properties(&self, pb: &PrimitiveBlock) -> Properties
Get the properties of the node
Sourcepub fn members(&self, pb: &PrimitiveBlock) -> Vec<IntermediateMember>
pub fn members(&self, pb: &PrimitiveBlock) -> Vec<IntermediateMember>
Each member can be node, way or relation.
Sourcepub fn to_intermediate_feature(
&self,
pb: &PrimitiveBlock,
) -> Option<IntermediateRelation>
pub fn to_intermediate_feature( &self, pb: &PrimitiveBlock, ) -> Option<IntermediateRelation>
returns the feature in intermediate format to build later
Sourcepub fn get_node_relation_pairs(
members: &[IntermediateMember],
) -> Vec<IntermediateNodeMember>
pub fn get_node_relation_pairs( members: &[IntermediateMember], ) -> Vec<IntermediateNodeMember>
Get the node relation pairs
Trait Implementations§
Source§impl OSMFilterable for Relation
impl OSMFilterable for Relation
Source§fn is_filterable<T: Reader, _N: KVStore<u64, VectorPoint<MValue>>, N: KVStore<u64, IntermediateNode>, _W: KVStore<u64, WayNodes>, W: KVStore<u64, IntermediateWay>, R: KVStore<u64, IntermediateRelation>>(
&self,
pb: &PrimitiveBlock,
reader: &mut OSMReader<T, _N, N, _W, W, R>,
) -> bool
fn is_filterable<T: Reader, _N: KVStore<u64, VectorPoint<MValue>>, N: KVStore<u64, IntermediateNode>, _W: KVStore<u64, WayNodes>, W: KVStore<u64, IntermediateWay>, R: KVStore<u64, IntermediateRelation>>( &self, pb: &PrimitiveBlock, reader: &mut OSMReader<T, _N, N, _W, W, R>, ) -> bool
Check if the object is filterable
impl StructuralPartialEq for Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnwindSafe for Relation
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().