pub struct MonotoneChainPolygon<'a, T: GeoNum> { /* private fields */ }Expand description
A Polygon backed by MonotoneChain.
§Example
use geo::{line_string, Polygon, MonotoneChainPolygon};
let polygon = Polygon::new(
line_string![
(x: 0., y: 0.),
(x: 10., y: 0.),
(x: 10., y: 10.),
(x: 0., y: 10.),
(x: 0., y: 0.),
],
vec![]
);
let m_polygon:MonotoneChainPolygon<f64> = (&polygon).into();Implementations§
Source§impl<'a, T: GeoNum> MonotoneChainPolygon<'a, T>
impl<'a, T: GeoNum> MonotoneChainPolygon<'a, T>
pub fn geometry(&self) -> &'a Polygon<T>
pub fn exterior(&self) -> &MonotoneChainLineString<'a, T>
pub fn interiors(&self) -> &[MonotoneChainLineString<'a, T>]
Trait Implementations§
Source§impl<'a, T> BoundingRect<T> for MonotoneChainPolygon<'a, T>where
T: GeoNum,
impl<'a, T> BoundingRect<T> for MonotoneChainPolygon<'a, T>where
T: GeoNum,
Source§impl<'a, T: GeoNum> ContainsProperly<MonotoneChainMultiPolygon<'a, T>> for MonotoneChainPolygon<'a, T>
impl<'a, T: GeoNum> ContainsProperly<MonotoneChainMultiPolygon<'a, T>> for MonotoneChainPolygon<'a, T>
fn contains_properly(&self, rhs: &MonotoneChainMultiPolygon<'a, T>) -> bool
Source§impl<'a, T: GeoNum> ContainsProperly<MonotoneChainPolygon<'a, T>> for MonotoneChainMultiPolygon<'a, T>
impl<'a, T: GeoNum> ContainsProperly<MonotoneChainPolygon<'a, T>> for MonotoneChainMultiPolygon<'a, T>
fn contains_properly(&self, rhs: &MonotoneChainPolygon<'a, T>) -> bool
Source§impl<'a, T: GeoNum> ContainsProperly for MonotoneChainPolygon<'a, T>
impl<'a, T: GeoNum> ContainsProperly for MonotoneChainPolygon<'a, T>
fn contains_properly(&self, rhs: &MonotoneChainPolygon<'a, T>) -> bool
Source§impl<'a, T: GeoNum> From<MonotoneChainPolygon<'a, T>> for &'a Polygon<T>
impl<'a, T: GeoNum> From<MonotoneChainPolygon<'a, T>> for &'a Polygon<T>
Source§fn from(val: MonotoneChainPolygon<'a, T>) -> Self
fn from(val: MonotoneChainPolygon<'a, T>) -> Self
Converts to this type from the input type.
Source§impl<'a, C: GeoNum> HasDimensions for MonotoneChainPolygon<'a, C>
impl<'a, C: GeoNum> HasDimensions for MonotoneChainPolygon<'a, C>
Source§fn dimensions(&self) -> Dimensions
fn dimensions(&self) -> Dimensions
The dimensions of some geometries are fixed, e.g. a Point always has 0 dimensions. However
for others, the dimensionality depends on the specific geometry instance - for example
typical
Rects are 2-dimensional, but it’s possible to create degenerate Rects which
have either 1 or 0 dimensions. Read moreSource§fn boundary_dimensions(&self) -> Dimensions
fn boundary_dimensions(&self) -> Dimensions
The dimensions of the
Geometry’s boundary, as used by OGC-SFA. Read moreSource§impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainPolygon<'a, T>
impl<'a, T> Intersects<MonotoneChainGeometry<'a, T>> for MonotoneChainPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainGeometry<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainLineString<'a, T>> for MonotoneChainPolygon<'a, T>
impl<'a, T> Intersects<MonotoneChainLineString<'a, T>> for MonotoneChainPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainLineString<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainMultiLineString<'a, T>> for MonotoneChainPolygon<'a, T>
impl<'a, T> Intersects<MonotoneChainMultiLineString<'a, T>> for MonotoneChainPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainMultiLineString<'a, T>) -> bool
Source§impl<'a, T: GeoNum> Intersects<MonotoneChainMultiPolygon<'a, T>> for MonotoneChainPolygon<'a, T>where
Coord<T>: Intersects<MultiPolygon<T>> + Intersects<Polygon<T>>,
MonotoneChain<'a, T>: Intersects<MonotoneChain<'a, T>>,
impl<'a, T: GeoNum> Intersects<MonotoneChainMultiPolygon<'a, T>> for MonotoneChainPolygon<'a, T>where
Coord<T>: Intersects<MultiPolygon<T>> + Intersects<Polygon<T>>,
MonotoneChain<'a, T>: Intersects<MonotoneChain<'a, T>>,
fn intersects(&self, rhs: &MonotoneChainMultiPolygon<'a, T>) -> bool
Source§impl<'a, T: GeoNum> Intersects<MonotoneChainPolygon<'a, T>> for MonotoneChainLineString<'a, T>
impl<'a, T: GeoNum> Intersects<MonotoneChainPolygon<'a, T>> for MonotoneChainLineString<'a, T>
fn intersects(&self, rhs: &MonotoneChainPolygon<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainPolygon<'a, T>> for MonotoneChainMultiLineString<'a, T>where
T: GeoNum,
impl<'a, T> Intersects<MonotoneChainPolygon<'a, T>> for MonotoneChainMultiLineString<'a, T>where
T: GeoNum,
fn intersects(&self, rhs: &MonotoneChainPolygon<'a, T>) -> bool
Source§impl<'a, T> Intersects<MonotoneChainPolygon<'a, T>> for MonotoneChainMultiPolygon<'a, T>
impl<'a, T> Intersects<MonotoneChainPolygon<'a, T>> for MonotoneChainMultiPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainPolygon<'a, T>) -> bool
Source§impl<'a, T: GeoNum> Intersects for MonotoneChainPolygon<'a, T>
impl<'a, T: GeoNum> Intersects for MonotoneChainPolygon<'a, T>
fn intersects(&self, rhs: &MonotoneChainPolygon<'a, T>) -> bool
Source§impl<'a: 'caller, 'caller, T: GeoNum> MonotoneChains<'a, 'caller, T> for MonotoneChainPolygon<'a, T>
impl<'a: 'caller, 'caller, T: GeoNum> MonotoneChains<'a, 'caller, T> for MonotoneChainPolygon<'a, T>
fn exterior_chains( &'caller self, ) -> impl Iterator<Item = &'caller MonotoneChain<'a, T>>
fn interior_chains( &'caller self, ) -> impl Iterator<Item = &'caller MonotoneChain<'a, T>>
fn chains(&'caller self) -> impl Iterator<Item = &'caller MonotoneChain<'a, T>>
Auto Trait Implementations§
impl<'a, T> Freeze for MonotoneChainPolygon<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for MonotoneChainPolygon<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for MonotoneChainPolygon<'a, T>
impl<'a, T> Sync for MonotoneChainPolygon<'a, T>where
T: Sync,
impl<'a, T> Unpin for MonotoneChainPolygon<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for MonotoneChainPolygon<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for MonotoneChainPolygon<'a, T>where
T: UnwindSafe + RefUnwindSafe,
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