Struct geom::FindClosest [−][src]
A quad-tree to quickly find the closest points to some polylines.
Fields
geometries: BTreeMap<K, LineString<f64>>
quadtree: QuadTree<K>
Implementations
impl<K> FindClosest<K> where
K: Clone + Ord + Debug,
[src]
K: Clone + Ord + Debug,
pub fn new(bounds: &Bounds) -> FindClosest<K>
[src]
Creates the quad-tree, limited to points contained in the boundary.
pub fn add(&mut self, key: K, pts: &Vec<Pt2D>)
[src]
Add an object to the quadtree, remembering some key associated with the points.
pub fn all_close_pts(
&self,
query_pt: Pt2D,
max_dist_away: Distance
) -> Vec<(K, Pt2D, Distance)>
[src]
&self,
query_pt: Pt2D,
max_dist_away: Distance
) -> Vec<(K, Pt2D, Distance)>
For every object within some distance of a query point, return the (object’s key, point on the object’s polyline, distance away).
pub fn closest_pt(
&self,
query_pt: Pt2D,
max_dist_away: Distance
) -> Option<(K, Pt2D)>
[src]
&self,
query_pt: Pt2D,
max_dist_away: Distance
) -> Option<(K, Pt2D)>
Finds the closest point on the existing geometry to the query pt.
Auto Trait Implementations
impl<K> RefUnwindSafe for FindClosest<K> where
K: RefUnwindSafe,
K: RefUnwindSafe,
impl<K> Send for FindClosest<K> where
K: Send,
K: Send,
impl<K> Sync for FindClosest<K> where
K: Sync,
K: Sync,
impl<K> Unpin for FindClosest<K> where
K: Unpin,
K: Unpin,
impl<K> UnwindSafe for FindClosest<K> where
K: RefUnwindSafe + UnwindSafe,
K: RefUnwindSafe + UnwindSafe,
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,
pub 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> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,