pub struct TarLine(pub Line<f64>, pub f64);Expand description
Custom struct to be used to insert into RTree
Represents a component Line of a target LineString.
The tuple stores the Line struct and the distance buffer to be used.
It’s rstar::Envelope method grows the rstar::AABB in x and y directions
by the distance.
Tuple Fields§
§0: Line<f64>§1: f64Implementations§
Source§impl TarLine
impl TarLine
Sourcepub fn dist_by_crs(&self, other: &Line, crs: &CrsType) -> f64
pub fn dist_by_crs(&self, other: &Line, crs: &CrsType) -> f64
Using geographic coordinate systems should be avoided with this algorithm. Measuring distance in geographic space between two lines finds the minimum distance between vertices whereas the euclidean distance between two lines considers all possible distances. Geographic distance may create false negatives.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TarLine
impl RefUnwindSafe for TarLine
impl Send for TarLine
impl Sync for TarLine
impl Unpin for TarLine
impl UnwindSafe for TarLine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§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 more