[−][src]Struct shapefile::record::poly::GenericPolygon
Fields
bbox: BBox
Methods
impl<PointType: HasXY> GenericPolygon<PointType>
[src]
impl<PointType: HasXY> GenericPolygon<PointType>
pub fn new(points: Vec<PointType>, parts: Vec<i32>) -> Self | [src] |
Examples
Creating a PolygonZ
use shapefile::{PointZ, PolygonZ, NO_DATA, MultipointShape}; let points = vec![ PointZ::new(1.0, 1.0, 0.0, NO_DATA), PointZ::new(2.0, 2.0, 17.0, NO_DATA), ]; let poly = PolygonZ::new(points, vec![0]); assert_eq!(poly.point(1), Some(&PointZ::new(2.0, 2.0, 17.0, NO_DATA)));
Trait Implementations
impl<PointType> MultipointShape<PointType> for GenericPolygon<PointType>
[src]
impl<PointType> MultipointShape<PointType> for GenericPolygon<PointType>
fn point<I: SliceIndex<[PointType]>>( | [src] |
fn points(&self) -> &[PointType] | [src] |
impl<PointType> MultipartShape<PointType> for GenericPolygon<PointType>
[src]
impl<PointType> MultipartShape<PointType> for GenericPolygon<PointType>
fn parts_indices(&self) -> &[i32] | [src] |
fn part(&self, index: usize) -> Option<&[PointType]> | [src] |
Returns the slice of points corresponding to part n°ìndex
if the shape actually has multiple parts Read more
ⓘImportant traits for PartIterator<'a, PointType, Shape>
ⓘImportant traits for PartIterator<'a, PointType, Shape>
fn parts(&self) -> PartIterator<PointType, Self> | [src] |
Returns an iterator over the parts of a MultipartShape Read more
impl<PointType> From<GenericPolygon<PointType>> for GenericPolyline<PointType>
[src]
impl<PointType> From<GenericPolygon<PointType>> for GenericPolyline<PointType>
fn from(p: GenericPolygon<PointType>) -> Self | [src] |
impl<PointType> From<GenericPolyline<PointType>> for GenericPolygon<PointType>
[src]
impl<PointType> From<GenericPolyline<PointType>> for GenericPolygon<PointType>
fn from(p: GenericPolyline<PointType>) -> Self | [src] |
impl From<GenericPolygon<Point>> for Shape
[src]
impl From<GenericPolygon<Point>> for Shape
impl From<GenericPolygon<PointM>> for Shape
[src]
impl From<GenericPolygon<PointM>> for Shape
impl From<GenericPolygon<PointZ>> for Shape
[src]
impl From<GenericPolygon<PointZ>> for Shape
Auto Trait Implementations
impl<PointType> Send for GenericPolygon<PointType> where
PointType: Send,
impl<PointType> Send for GenericPolygon<PointType> where
PointType: Send,
impl<PointType> Sync for GenericPolygon<PointType> where
PointType: Sync,
impl<PointType> Sync for GenericPolygon<PointType> where
PointType: Sync,
Blanket Implementations
impl<S> ReadableShape for S where
S: ConcreteReadableShape,
[src]
impl<S> ReadableShape for S where
S: ConcreteReadableShape,
type ReadShape = <S as ConcreteShape>::ActualShape
fn read_from<T>(&mut T, i32) -> Result<<S as ReadableShape>::ReadShape, Error> where | [src] |
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |