[−][src]Struct shapefile::record::multipatch::Multipatch
Following things are important with Multipatch shape:
- Ring types must be closed
- InnerRings must follow their OuterRings
- Parts must not intersects or penetrate each others
Fields
bbox: BBox
points: Vec<PointZ>
parts: Vec<i32>
parts_type: Vec<PatchType>
z_range: [f64; 2]
m_range: [f64; 2]
Methods
impl Multipatch
[src]
pub fn new(points: Vec<PointZ>, part_type: PatchType) -> Self
[src]
Examples
Creating a Multipatch with one outer ring, The constructor closes rings
use shapefile::{PointZ, Multipatch, NO_DATA, PatchType}; let points = vec![ PointZ::new(0.0, 0.0, 0.0, NO_DATA), PointZ::new(0.0, 1.0, 0.0, NO_DATA), PointZ::new(1.0, 0.0, 0.0, NO_DATA), ]; let multip = Multipatch::new(points, PatchType::OuterRing); // The polygon gets closed 'explicitly' assert_eq!(multip.points.len(), 4); assert_eq!(multip.points.last(), multip.points.first());
pub fn with_parts(parts_points: Vec<(Vec<PointZ>, PatchType)>) -> Self
[src]
pub fn empty() -> Self
[src]
Trait Implementations
impl Clone for Multipatch
[src]
fn clone(&self) -> Multipatch
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ConcreteReadableShape for Multipatch
[src]
impl ConcreteShape for Multipatch
[src]
impl Debug for Multipatch
[src]
impl Display for Multipatch
[src]
impl EsriShape for Multipatch
[src]
impl From<MultiPolygon<f64>> for Multipatch
[src]
impl From<Multipatch> for Shape
[src]
fn from(concrete: Multipatch) -> Self
[src]
impl From<Polygon<f64>> for Multipatch
[src]
impl HasShapeType for Multipatch
[src]
impl MultipartShape<PointZ> for Multipatch
[src]
fn parts_indices(&self) -> &[i32]
[src]
fn part(&self, index: usize) -> Option<&[PointType]>
[src]
ⓘImportant traits for PartIterator<'a, PointType, Shape>fn parts(&self) -> PartIterator<PointType, Self>
[src]
ⓘImportant traits for PartIterator<'a, PointType, Shape>
impl MultipointShape<PointZ> for Multipatch
[src]
fn point<I: SliceIndex<[PointZ]>>(
&self,
index: I
) -> Option<&<I as SliceIndex<[PointZ]>>::Output>
[src]
&self,
index: I
) -> Option<&<I as SliceIndex<[PointZ]>>::Output>
fn points(&self) -> &[PointZ]
[src]
impl PartialEq<Multipatch> for Multipatch
[src]
fn eq(&self, other: &Multipatch) -> bool
[src]
fn ne(&self, other: &Multipatch) -> bool
[src]
impl StructuralPartialEq for Multipatch
[src]
impl TryFrom<Multipatch> for MultiPolygon<f64>
[src]
Converts a Multipatch to Multipolygon
For simplicity,reasons, Triangle Fan & Triangle Strip are considered
to be valid polygons
When the individual types of rings in a collection of rings representing a polygonal patch with holes are unknown, the sequence must start with First Ring, followed by a number of Rings. A sequence of Rings not preceded by an First Ring is treated as a sequence of Outer Rings without holes.
type Error = Error
The type returned in the event of a conversion error.
fn try_from(mp: Multipatch) -> Result<Self, Self::Error>
[src]
impl TryFrom<Shape> for Multipatch
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(shape: Shape) -> Result<Self, Self::Error>
[src]
impl WritableShape for Multipatch
[src]
Auto Trait Implementations
impl RefUnwindSafe for Multipatch
impl Send for Multipatch
impl Sync for Multipatch
impl Unpin for Multipatch
impl UnwindSafe for Multipatch
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S> ReadableShape for S where
S: ConcreteReadableShape,
[src]
S: ConcreteReadableShape,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,