pub struct Polygon {
pub exterior: LineString,
pub interiors: Vec<LineString>,
}Expand description
Polygon geometry
Fields§
§exterior: LineStringExterior ring
interiors: Vec<LineString>Interior rings (holes)
Implementations§
Source§impl Polygon
impl Polygon
Sourcepub fn new(
exterior: LineString,
interiors: Vec<LineString>,
) -> Result<Polygon, OxiGdalError>
pub fn new( exterior: LineString, interiors: Vec<LineString>, ) -> Result<Polygon, OxiGdalError>
Creates a new polygon
Sourcepub fn exterior(&self) -> &LineString
pub fn exterior(&self) -> &LineString
Returns a reference to the exterior ring
Sourcepub fn interiors(&self) -> &[LineString]
pub fn interiors(&self) -> &[LineString]
Returns a reference to the interior rings (holes)
Trait Implementations§
Source§impl ContainsPredicate for Polygon
impl ContainsPredicate for Polygon
Source§impl CrossesPredicate for Polygon
impl CrossesPredicate for Polygon
Source§impl<'de> Deserialize<'de> for Polygon
impl<'de> Deserialize<'de> for Polygon
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Polygon, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Polygon, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntersectsPredicate for Polygon
impl IntersectsPredicate for Polygon
Source§fn intersects(&self, other: &Self) -> Result<bool>
fn intersects(&self, other: &Self) -> Result<bool>
Tests if this geometry intersects another
Source§impl OverlapsPredicate for Polygon
impl OverlapsPredicate for Polygon
Source§impl Serialize for Polygon
impl Serialize for Polygon
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TouchesPredicate for Polygon
impl TouchesPredicate for Polygon
impl StructuralPartialEq for Polygon
Auto Trait Implementations§
impl Freeze for Polygon
impl RefUnwindSafe for Polygon
impl Send for Polygon
impl Sync for Polygon
impl Unpin for Polygon
impl UnsafeUnpin for Polygon
impl UnwindSafe for Polygon
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