Struct geo::LineString [−][src]
An ordered collection of two or more Coordinate
s, representing a
path between locations.
Semantics
A LineString
is closed if it is empty, or if the
first and last coordinates are the same. The boundary
of a LineString
is empty if closed, and otherwise the
end points. The interior is the (infinite) set of all
points along the linestring not including the
boundary. A LineString
is simple if it does not
intersect except possibly at the first and last
coordinates. A simple and closed LineString
is a
LinearRing
as defined in the OGC-SFA (but is not a
separate type here).
Validity
A LineString
is valid if it is either empty or
contains 2 or more coordinates. Further, a closed
LineString
must not self intersect. Note that the
validity is not enforced, and the operations and
predicates are undefined on invalid linestrings.
Examples
Create a LineString
by calling it directly:
use geo_types::{Coordinate, LineString}; let line_string = LineString(vec![ Coordinate { x: 0., y: 0. }, Coordinate { x: 10., y: 0. }, ]);
Create a LineString
with the line_string!
macro:
use geo_types::line_string; let line_string = line_string![ (x: 0., y: 0.), (x: 10., y: 0.), ];
Converting a Vec
of Coordinate
-like things:
use geo_types::LineString; let line_string: LineString<f32> = vec![(0., 0.), (10., 0.)].into();
use geo_types::LineString; let line_string: LineString<f64> = vec![[0., 0.], [10., 0.]].into();
Or collect
ing from a Coordinate
iterator
use geo_types::{Coordinate, LineString}; let mut coords_iter = vec![Coordinate { x: 0., y: 0. }, Coordinate { x: 10., y: 0. }].into_iter(); let line_string: LineString<f32> = coords_iter.collect();
You can iterate over the coordinates in the LineString
:
use geo_types::{Coordinate, LineString}; let line_string = LineString(vec![ Coordinate { x: 0., y: 0. }, Coordinate { x: 10., y: 0. }, ]); for coord in line_string { println!("Coordinate x = {}, y = {}", coord.x, coord.y); }
You can also iterate over the coordinates in the LineString
as Point
s:
use geo_types::{Coordinate, LineString}; let line_string = LineString(vec![ Coordinate { x: 0., y: 0. }, Coordinate { x: 10., y: 0. }, ]); for point in line_string.points_iter() { println!("Point x = {}, y = {}", point.x(), point.y()); }
Implementations
impl<T> LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
pub fn points_iter(&self) -> PointsIter<'_, T>
[src]
Return an iterator yielding the coordinates of a LineString
as Point
s
pub fn into_points(self) -> Vec<Point<T>, Global>
[src]
Return the coordinates of a LineString
as a Vec
of Point
s
pub fn lines(&'a self) -> impl ExactSizeIterator + Iterator<Item = Line<T>> + 'a
[src]
Return an iterator yielding one Line
for each line segment
in the LineString
.
Examples
use geo_types::{Coordinate, Line, LineString}; let mut coords = vec![(0., 0.), (5., 0.), (7., 9.)]; let line_string: LineString<f32> = coords.into_iter().collect(); let mut lines = line_string.lines(); assert_eq!( Some(Line::new( Coordinate { x: 0., y: 0. }, Coordinate { x: 5., y: 0. } )), lines.next() ); assert_eq!( Some(Line::new( Coordinate { x: 5., y: 0. }, Coordinate { x: 7., y: 9. } )), lines.next() ); assert!(lines.next().is_none());
pub fn triangles(
&'a self
) -> impl ExactSizeIterator + Iterator<Item = Triangle<T>> + 'a
[src]
&'a self
) -> impl ExactSizeIterator + Iterator<Item = Triangle<T>> + 'a
An iterator which yields the coordinates of a LineString
as Triangle
s
pub fn close(&mut self)
[src]
Close the LineString
. Specifically, if the LineString
has at least one coordinate, and
the value of the first coordinate does not equal the value of the last coordinate, then a
new coordinate is added to the end with the value of the first coordinate.
pub fn num_coords(&self) -> usize
[src]
Use geo::algorithm::coords_iter::CoordsIter::coords_count instead
Return the number of coordinates in the LineString
.
Examples
use geo_types::LineString; let mut coords = vec![(0., 0.), (5., 0.), (7., 9.)]; let line_string: LineString<f32> = coords.into_iter().collect(); assert_eq!(3, line_string.num_coords());
pub fn is_closed(&self) -> bool
[src]
Checks if the linestring is closed; i.e. it is either empty or, the first and last points are the same.
Examples
use geo_types::LineString; let mut coords = vec![(0., 0.), (5., 0.), (0., 0.)]; let line_string: LineString<f32> = coords.into_iter().collect(); assert!(line_string.is_closed());
Note that we diverge from some libraries (JTS et al), which have a LinearRing type,
separate from LineString. Those libraries treat an empty LinearRing as closed, by
definition, while treating an empty LineString as open. Since we don’t have a separate
LinearRing type, and use a LineString in its place, we adopt the JTS LinearRing is_closed
behavior in all places, that is, we consider an empty LineString as closed.
This is expected when used in the context of a Polygon.exterior and elswhere; And there seems to be no reason to maintain the separate behavior for LineStrings used in non-LinearRing contexts.
Trait Implementations
impl<T> AbsDiffEq<LineString<T>> for LineString<T> where
T: CoordNum + AbsDiffEq<T, Epsilon = T>,
[src]
T: CoordNum + AbsDiffEq<T, Epsilon = T>,
type Epsilon = T
Used for specifying relative comparisons.
pub fn default_epsilon() -> <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
[src]
pub fn abs_diff_eq(
&self,
other: &LineString<T>,
epsilon: <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
) -> bool
[src]
&self,
other: &LineString<T>,
epsilon: <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
) -> bool
Equality assertion with a absolute limit.
Examples
use geo_types::LineString; let mut coords_a = vec![(0., 0.), (5., 0.), (7., 9.)]; let a: LineString<f32> = coords_a.into_iter().collect(); let mut coords_b = vec![(0., 0.), (5., 0.), (7.001, 9.)]; let b: LineString<f32> = coords_b.into_iter().collect(); approx::assert_relative_eq!(a, b, epsilon=0.1)
pub fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
impl<T> Area<T> for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
fn signed_area(&self) -> T
[src]
fn unsigned_area(&self) -> T
[src]
impl<T> BoundingRect<T> for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
type Output = Option<Rect<T>>
fn bounding_rect(&self) -> Self::Output
[src]
Return the BoundingRect for a LineString
impl<T> Centroid for LineString<T> where
T: CoordFloat,
[src]
T: CoordFloat,
impl<T> Clone for LineString<T> where
T: Clone + CoordNum,
[src]
T: Clone + CoordNum,
pub fn clone(&self) -> LineString<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F: GeoFloat> ClosestPoint<F, Point<F>> for LineString<F>
[src]
fn closest_point(&self, p: &Point<F>) -> Closest<F>
[src]
impl<T> ConcaveHull for LineString<T> where
T: GeoFloat + RTreeNum,
[src]
T: GeoFloat + RTreeNum,
impl<T> Contains<Coordinate<T>> for LineString<T> where
T: GeoNum,
[src]
T: GeoNum,
fn contains(&self, coord: &Coordinate<T>) -> bool
[src]
impl<T> Contains<Line<T>> for LineString<T> where
T: GeoNum,
[src]
T: GeoNum,
impl<T> Contains<LineString<T>> for Line<T> where
T: GeoNum,
[src]
T: GeoNum,
fn contains(&self, linestring: &LineString<T>) -> bool
[src]
impl<T> Contains<LineString<T>> for LineString<T> where
T: GeoNum,
[src]
T: GeoNum,
fn contains(&self, rhs: &LineString<T>) -> bool
[src]
impl<T> Contains<LineString<T>> for Polygon<T> where
T: GeoNum,
[src]
T: GeoNum,
fn contains(&self, linestring: &LineString<T>) -> bool
[src]
impl<T> Contains<Point<T>> for LineString<T> where
T: GeoNum,
[src]
T: GeoNum,
impl<T> ConvexHull for LineString<T> where
T: GeoNum,
[src]
T: GeoNum,
type Scalar = T
fn convex_hull(&self) -> Polygon<T>
[src]
impl<T> CoordinatePosition for LineString<T> where
T: GeoNum,
[src]
T: GeoNum,
type Scalar = T
fn calculate_coordinate_position(
&self,
coord: &Coordinate<T>,
is_inside: &mut bool,
boundary_count: &mut usize
)
[src]
&self,
coord: &Coordinate<T>,
is_inside: &mut bool,
boundary_count: &mut usize
)
fn coordinate_position(&self, coord: &Coordinate<Self::Scalar>) -> CoordPos
[src]
impl<'a, T: CoordNum + 'a> CoordsIter<'a> for LineString<T>
[src]
type Iter = Copied<Iter<'a, Coordinate<T>>>
type ExteriorIter = Self::Iter
type Scalar = T
fn coords_iter(&'a self) -> Self::Iter
[src]
fn coords_count(&'a self) -> usize
[src]
Return the number of coordinates in the LineString
.
fn exterior_coords_iter(&'a self) -> Self::ExteriorIter
[src]
impl<T> Debug for LineString<T> where
T: Debug + CoordNum,
[src]
T: Debug + CoordNum,
impl<T> Eq for LineString<T> where
T: Eq + CoordNum,
[src]
T: Eq + CoordNum,
impl<T> EuclideanDistance<T, Line<T>> for LineString<T> where
T: GeoFloat + FloatConst + Signed + RTreeNum,
[src]
T: GeoFloat + FloatConst + Signed + RTreeNum,
LineString to Line
fn euclidean_distance(&self, other: &Line<T>) -> T
[src]
impl<T> EuclideanDistance<T, LineString<T>> for Point<T> where
T: GeoFloat,
[src]
T: GeoFloat,
fn euclidean_distance(&self, linestring: &LineString<T>) -> T
[src]
Minimum distance from a Point to a LineString
impl<T> EuclideanDistance<T, LineString<T>> for Line<T> where
T: GeoFloat + FloatConst + Signed + RTreeNum,
[src]
T: GeoFloat + FloatConst + Signed + RTreeNum,
Line to LineString
fn euclidean_distance(&self, other: &LineString<T>) -> T
[src]
impl<T> EuclideanDistance<T, LineString<T>> for LineString<T> where
T: GeoFloat + Signed + RTreeNum,
[src]
T: GeoFloat + Signed + RTreeNum,
LineString-LineString distance
fn euclidean_distance(&self, other: &LineString<T>) -> T
[src]
impl<T> EuclideanDistance<T, LineString<T>> for Polygon<T> where
T: GeoFloat + FloatConst + Signed + RTreeNum,
[src]
T: GeoFloat + FloatConst + Signed + RTreeNum,
Polygon to LineString distance
fn euclidean_distance(&self, other: &LineString<T>) -> T
[src]
impl<T> EuclideanDistance<T, Point<T>> for LineString<T> where
T: GeoFloat,
[src]
T: GeoFloat,
fn euclidean_distance(&self, point: &Point<T>) -> T
[src]
Minimum distance from a LineString to a Point
impl<T> EuclideanDistance<T, Polygon<T>> for LineString<T> where
T: GeoFloat + FloatConst + Signed + RTreeNum,
[src]
T: GeoFloat + FloatConst + Signed + RTreeNum,
LineString to Polygon
fn euclidean_distance(&self, other: &Polygon<T>) -> T
[src]
impl<T> EuclideanLength<T, LineString<T>> for LineString<T> where
T: CoordFloat + Sum,
[src]
T: CoordFloat + Sum,
fn euclidean_length(&self) -> T
[src]
impl<T> FrechetDistance<T, LineString<T>> for LineString<T> where
T: GeoFloat + FromPrimitive,
[src]
T: GeoFloat + FromPrimitive,
fn frechet_distance(&self, ls: &LineString<T>) -> T
[src]
impl<T> From<LineString<T>> for Geometry<T> where
T: CoordNum,
[src]
T: CoordNum,
pub fn from(x: LineString<T>) -> Geometry<T>
[src]
impl<T, IC> From<Vec<IC, Global>> for LineString<T> where
T: CoordNum,
IC: Into<Coordinate<T>>,
[src]
T: CoordNum,
IC: Into<Coordinate<T>>,
Turn a Vec
of Point
-like objects into a LineString
.
pub fn from(v: Vec<IC, Global>) -> LineString<T>
[src]
impl<T, IC> FromIterator<IC> for LineString<T> where
T: CoordNum,
IC: Into<Coordinate<T>>,
[src]
T: CoordNum,
IC: Into<Coordinate<T>>,
Turn an iterator of Point
-like objects into a LineString
.
pub fn from_iter<I>(iter: I) -> LineString<T> where
I: IntoIterator<Item = IC>,
[src]
I: IntoIterator<Item = IC>,
impl GeodesicLength<f64, LineString<f64>> for LineString<f64>
[src]
fn geodesic_length(&self) -> f64
[src]
impl<C: CoordNum> HasDimensions for LineString<C>
[src]
fn is_empty(&self) -> bool
[src]
fn dimensions(&self) -> Dimensions
[src]
fn boundary_dimensions(&self) -> Dimensions
[src]
use geo_types::line_string; use geo::algorithm::dimensions::{HasDimensions, Dimensions}; let ls = line_string![(x: 0., y: 0.), (x: 0., y: 1.), (x: 1., y: 1.)]; assert_eq!(Dimensions::ZeroDimensional, ls.boundary_dimensions()); let ls = line_string![(x: 0., y: 0.), (x: 0., y: 1.), (x: 1., y: 1.), (x: 0., y: 0.)]; assert_eq!(Dimensions::Empty, ls.boundary_dimensions());
impl<T> Hash for LineString<T> where
T: Hash + CoordNum,
[src]
T: Hash + CoordNum,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> HaversineLength<T, LineString<T>> for LineString<T> where
T: CoordFloat + FromPrimitive,
[src]
T: CoordFloat + FromPrimitive,
fn haversine_length(&self) -> T
[src]
impl<T> Index<usize> for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
type Output = Coordinate<T>
The returned type after indexing.
pub fn index(&self, index: usize) -> &Coordinate<T>
[src]
impl<T> IndexMut<usize> for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
pub fn index_mut(&mut self, index: usize) -> &mut Coordinate<T>
[src]
impl<T, G> Intersects<G> for LineString<T> where
T: CoordNum,
Line<T>: Intersects<G>,
[src]
T: CoordNum,
Line<T>: Intersects<G>,
fn intersects(&self, geom: &G) -> bool
[src]
impl<T> Intersects<LineString<T>> for Coordinate<T> where
LineString<T>: Intersects<Coordinate<T>>,
T: CoordNum,
[src]
LineString<T>: Intersects<Coordinate<T>>,
T: CoordNum,
fn intersects(&self, rhs: &LineString<T>) -> bool
[src]
impl<T> Intersects<LineString<T>> for Line<T> where
LineString<T>: Intersects<Line<T>>,
T: CoordNum,
[src]
LineString<T>: Intersects<Line<T>>,
T: CoordNum,
fn intersects(&self, rhs: &LineString<T>) -> bool
[src]
impl<T> Intersects<LineString<T>> for Polygon<T> where
LineString<T>: Intersects<Polygon<T>>,
T: CoordNum,
[src]
LineString<T>: Intersects<Polygon<T>>,
T: CoordNum,
fn intersects(&self, rhs: &LineString<T>) -> bool
[src]
impl<'a, T> IntoIterator for &'a mut LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
Mutably iterate over all the Coordinates in this LineString
.
type Item = &'a mut Coordinate<T>
The type of the elements being iterated over.
type IntoIter = IterMut<'a, Coordinate<T>>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> IterMut<'a, Coordinate<T>>
[src]
impl<T> IntoIterator for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
Iterate over all the Coordinates in this LineString
.
type Item = Coordinate<T>
The type of the elements being iterated over.
type IntoIter = IntoIter<Coordinate<T>, Global>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> <LineString<T> as IntoIterator>::IntoIter
[src]
impl<T: HasKernel> IsConvex for LineString<T>
[src]
fn convex_orientation(
&self,
allow_collinear: bool,
specific_orientation: Option<Orientation>
) -> Option<Orientation>
[src]
&self,
allow_collinear: bool,
specific_orientation: Option<Orientation>
) -> Option<Orientation>
fn is_collinear(&self) -> bool
[src]
fn is_convex(&self) -> bool
[src]
fn is_ccw_convex(&self) -> bool
[src]
fn is_cw_convex(&self) -> bool
[src]
fn is_strictly_convex(&self) -> bool
[src]
fn is_strictly_ccw_convex(&self) -> bool
[src]
fn is_strictly_cw_convex(&self) -> bool
[src]
impl<T> LineInterpolatePoint<T> for LineString<T> where
T: CoordFloat + AddAssign + Debug,
Line<T>: EuclideanLength<T>,
LineString<T>: EuclideanLength<T>,
[src]
T: CoordFloat + AddAssign + Debug,
Line<T>: EuclideanLength<T>,
LineString<T>: EuclideanLength<T>,
impl<T> LineLocatePoint<T, Point<T>> for LineString<T> where
T: CoordFloat + AddAssign,
Line<T>: EuclideanDistance<T, Point<T>> + EuclideanLength<T>,
LineString<T>: EuclideanLength<T>,
[src]
T: CoordFloat + AddAssign,
Line<T>: EuclideanDistance<T, Point<T>> + EuclideanLength<T>,
LineString<T>: EuclideanLength<T>,
type Output = Option<T>
type Rhs = Point<T>
fn line_locate_point(&self, p: &Self::Rhs) -> Self::Output
[src]
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for LineString<T>
[src]
type Output = LineString<NT>
fn map_coords(&self, func: impl Fn(&(T, T)) -> (NT, NT) + Copy) -> Self::Output
[src]
impl<T: CoordNum> MapCoordsInplace<T> for LineString<T>
[src]
impl<T> PartialEq<LineString<T>> for LineString<T> where
T: PartialEq<T> + CoordNum,
[src]
T: PartialEq<T> + CoordNum,
pub fn eq(&self, other: &LineString<T>) -> bool
[src]
pub fn ne(&self, other: &LineString<T>) -> bool
[src]
impl<T> PointDistance for LineString<T> where
T: Float + RTreeNum,
[src]
T: Float + RTreeNum,
pub fn distance_2(&self, point: &Point<T>) -> T
[src]
pub fn contains_point(
&self,
point: &<Self::Envelope as Envelope>::Point
) -> bool
[src]
&self,
point: &<Self::Envelope as Envelope>::Point
) -> bool
pub fn distance_2_if_less_or_equal(
&self,
point: &<Self::Envelope as Envelope>::Point,
max_distance_2: <<Self::Envelope as Envelope>::Point as Point>::Scalar
) -> Option<<<Self::Envelope as Envelope>::Point as Point>::Scalar>
[src]
&self,
point: &<Self::Envelope as Envelope>::Point,
max_distance_2: <<Self::Envelope as Envelope>::Point as Point>::Scalar
) -> Option<<<Self::Envelope as Envelope>::Point as Point>::Scalar>
impl<T> RTreeObject for LineString<T> where
T: Float + RTreeNum,
[src]
T: Float + RTreeNum,
type Envelope = AABB<Point<T>>
The object’s envelope type. Usually, AABB will be the right choice. This type also defines the objects dimensionality. Read more
pub fn envelope(&self) -> <LineString<T> as RTreeObject>::Envelope
[src]
impl<T> RelativeEq<LineString<T>> for LineString<T> where
T: AbsDiffEq<T, Epsilon = T> + CoordNum + RelativeEq<T>,
[src]
T: AbsDiffEq<T, Epsilon = T> + CoordNum + RelativeEq<T>,
pub fn default_max_relative(
) -> <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
[src]
) -> <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
pub fn relative_eq(
&self,
other: &LineString<T>,
epsilon: <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon,
max_relative: <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
) -> bool
[src]
&self,
other: &LineString<T>,
epsilon: <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon,
max_relative: <LineString<T> as AbsDiffEq<LineString<T>>>::Epsilon
) -> bool
Equality assertion within a relative limit.
Examples
use geo_types::LineString; let mut coords_a = vec![(0., 0.), (5., 0.), (7., 9.)]; let a: LineString<f32> = coords_a.into_iter().collect(); let mut coords_b = vec![(0., 0.), (5., 0.), (7.001, 9.)]; let b: LineString<f32> = coords_b.into_iter().collect(); approx::assert_relative_eq!(a, b, max_relative=0.1)
pub fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl<T> Rotate<T> for LineString<T> where
T: CoordFloat,
[src]
T: CoordFloat,
fn rotate(&self, angle: T) -> Self
[src]
Rotate the LineString about its centroid by the given number of degrees
impl<T> Simplify<T, T> for LineString<T> where
T: GeoFloat,
[src]
T: GeoFloat,
impl<T> SimplifyIdx<T, T> for LineString<T> where
T: GeoFloat,
[src]
T: GeoFloat,
fn simplify_idx(&self, epsilon: &T) -> Vec<usize>
[src]
impl<T> SimplifyVW<T, T> for LineString<T> where
T: CoordFloat,
[src]
T: CoordFloat,
fn simplifyvw(&self, epsilon: &T) -> LineString<T>
[src]
impl<T> SimplifyVWPreserve<T, T> for LineString<T> where
T: CoordFloat + RTreeNum,
[src]
T: CoordFloat + RTreeNum,
fn simplifyvw_preserve(&self, epsilon: &T) -> LineString<T>
[src]
impl<T> SimplifyVwIdx<T, T> for LineString<T> where
T: CoordFloat,
[src]
T: CoordFloat,
fn simplifyvw_idx(&self, epsilon: &T) -> Vec<usize>
[src]
impl<T> StructuralEq for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
impl<T> StructuralPartialEq for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for LineString<T> where
T: CoordNum,
[src]
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(
geom: Geometry<T>
) -> Result<LineString<T>, <LineString<T> as TryFrom<Geometry<T>>>::Error>
[src]
geom: Geometry<T>
) -> Result<LineString<T>, <LineString<T> as TryFrom<Geometry<T>>>::Error>
impl<T: CoordNum, NT: CoordNum> TryMapCoords<T, NT> for LineString<T>
[src]
type Output = LineString<NT>
fn try_map_coords(
&self,
func: impl Fn(&(T, T)) -> Result<(NT, NT), Box<dyn Error + Send + Sync>> + Copy
) -> Result<Self::Output, Box<dyn Error + Send + Sync>>
[src]
&self,
func: impl Fn(&(T, T)) -> Result<(NT, NT), Box<dyn Error + Send + Sync>> + Copy
) -> Result<Self::Output, Box<dyn Error + Send + Sync>>
impl<T> VincentyLength<T, LineString<T>> for LineString<T> where
T: CoordFloat + FromPrimitive,
[src]
T: CoordFloat + FromPrimitive,
fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
[src]
impl<T, K> Winding for LineString<T> where
T: HasKernel<Ker = K>,
K: Kernel<T>,
[src]
T: HasKernel<Ker = K>,
K: Kernel<T>,
type Scalar = T
fn winding_order(&self) -> Option<WindingOrder>
[src]
fn points_cw(&self) -> Points<'_, Self::Scalar>ⓘ
[src]
Iterate over the points in a clockwise order
The Linestring isn’t changed, and the points are returned either in order, or in reverse order, so that the resultant order makes it appear clockwise
fn points_ccw(&self) -> Points<'_, Self::Scalar>ⓘ
[src]
Iterate over the points in a counter-clockwise order
The Linestring isn’t changed, and the points are returned either in order, or in reverse order, so that the resultant order makes it appear counter-clockwise
fn make_cw_winding(&mut self)
[src]
Change this line’s points so they are in clockwise winding order
fn make_ccw_winding(&mut self)
[src]
Change this line’s points so they are in counterclockwise winding order
fn is_cw(&self) -> bool
[src]
fn is_ccw(&self) -> bool
[src]
fn clone_to_winding_order(&self, winding_order: WindingOrder) -> Self where
Self: Sized + Clone,
[src]
Self: Sized + Clone,
fn make_winding_order(&mut self, winding_order: WindingOrder)
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for LineString<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for LineString<T> where
T: Send,
T: Send,
impl<T> Sync for LineString<T> where
T: Sync,
T: Sync,
impl<T> Unpin for LineString<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for LineString<T> where
T: UnwindSafe,
T: 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<'a, T, G> Extremes<'a, T> for G where
T: CoordNum,
G: CoordsIter<'a, Scalar = T>,
[src]
T: CoordNum,
G: CoordsIter<'a, Scalar = T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, G> RotatePoint<T> for G where
T: CoordFloat,
G: MapCoords<T, T, Output = G>,
[src]
T: CoordFloat,
G: MapCoords<T, T, Output = G>,
pub fn rotate_around_point(&Self, T, Point<T>) -> G
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, G> Translate<T> for G where
T: CoordNum,
G: MapCoords<T, T, Output = G> + MapCoordsInplace<T>,
[src]
T: CoordNum,
G: MapCoords<T, T, Output = G> + MapCoordsInplace<T>,
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>,