pub struct Zolygon<'a> { /* private fields */ }Expand description
A polygon is a closed shape defined by a list of coordinates.
The polygon is represented by a bounding box and a list of coordinates.
The coordinates are stored in a Coords struct, which is a slice of f64 values.
The first and last coordinates must be the same.
Don’t support holes.
Implementations§
Source§impl<'a> Zolygon<'a>
impl<'a> Zolygon<'a>
pub fn new(bounding_box: &'a BoundingBox, coords: &'a Coords) -> Self
pub fn from_bytes(data: &'a [u8]) -> Self
pub fn write_from_geometry( writer: &mut impl Write, geometry: &Polygon<f64>, ) -> Result<(), Error>
pub fn bounding_box(&self) -> &'a BoundingBox
pub fn coords(&self) -> &'a Coords
pub fn segments(&self) -> impl Iterator<Item = Segment<'a>>
pub fn is_empty(&self) -> bool
pub fn to_geo(&self) -> Polygon<f64>
Trait Implementations§
Source§impl<'a> RelationBetweenShapes<Coord> for Zolygon<'a>
impl<'a> RelationBetweenShapes<Coord> for Zolygon<'a>
Source§impl<'a> RelationBetweenShapes<Polygon> for Zolygon<'a>
impl<'a> RelationBetweenShapes<Polygon> for Zolygon<'a>
Source§impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zolygon<'a>
impl<'a> RelationBetweenShapes<Zerometry<'a>> for Zolygon<'a>
Source§impl<'a> RelationBetweenShapes<Zoint<'a>> for Zolygon<'a>
impl<'a> RelationBetweenShapes<Zoint<'a>> for Zolygon<'a>
Source§impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zerometry<'a>
impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zerometry<'a>
Source§impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zoint<'a>
impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zoint<'a>
Source§impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zolygon<'a>
impl<'a> RelationBetweenShapes<Zolygon<'a>> for Zolygon<'a>
Source§impl<'a> RelationBetweenShapes<Zolygon<'a>> for ZultiPoints<'a>
impl<'a> RelationBetweenShapes<Zolygon<'a>> for ZultiPoints<'a>
Source§impl<'a> RelationBetweenShapes<Zolygon<'a>> for ZultiPolygon<'a>
impl<'a> RelationBetweenShapes<Zolygon<'a>> for ZultiPolygon<'a>
Source§impl<'a> RelationBetweenShapes<ZultiPoints<'a>> for Zolygon<'a>
impl<'a> RelationBetweenShapes<ZultiPoints<'a>> for Zolygon<'a>
Source§impl<'a> RelationBetweenShapes<ZultiPolygon<'a>> for Zolygon<'a>
impl<'a> RelationBetweenShapes<ZultiPolygon<'a>> for Zolygon<'a>
impl<'a> Copy for Zolygon<'a>
Auto Trait Implementations§
impl<'a> Freeze for Zolygon<'a>
impl<'a> RefUnwindSafe for Zolygon<'a>
impl<'a> Send for Zolygon<'a>
impl<'a> Sync for Zolygon<'a>
impl<'a> Unpin for Zolygon<'a>
impl<'a> UnwindSafe for Zolygon<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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