[−][src]Struct shapefile::record::multipoint::GenericMultipoint
Generic struct to create the Multipoint, MultipointM, MultipointZ types
Fields
bbox: BBox
The 2D bounding box
points: Vec<PointType>
Methods
impl<PointType: HasXY> GenericMultipoint<PointType>
[src]
pub fn new(points: Vec<PointType>) -> Self
[src]
Creates a new Multipoint shape
Examples
Creating Multipoint
use shapefile::{Multipoint, Point}; let points = vec![ Point::new(1.0, 1.0), Point::new(2.0, 2.0), ]; let multipoint = Multipoint::new(points);
Creating a MultipointM
use shapefile::{MultipointM, PointM, NO_DATA}; let points = vec![ PointM::new(1.0, 1.0, NO_DATA), PointM::new(2.0, 2.0, NO_DATA), ]; let multipointm = MultipointM::new(points);
Creating a MultipointZ
use shapefile::{MultipointZ, PointZ, NO_DATA}; let points = vec![ PointZ::new(1.0, 1.0, 1.0, NO_DATA), PointZ::new(2.0, 2.0, 2.0, NO_DATA), ]; let multipointz = MultipointZ::new(points);
Trait Implementations
impl<PointType> MultipointShape<PointType> for GenericMultipoint<PointType>
[src]
fn point<I: SliceIndex<[PointType]>>(
&self,
index: I
) -> Option<&<I as SliceIndex<[PointType]>>::Output>
[src]
&self,
index: I
) -> Option<&<I as SliceIndex<[PointType]>>::Output>
fn points(&self) -> &[PointType]
[src]
impl<PointType> From<GenericMultipoint<PointType>> for MultiPoint<f64> where
Point<f64>: From<PointType>,
[src]
Point<f64>: From<PointType>,
fn from(multi_points: GenericMultipoint<PointType>) -> Self
[src]
impl<PointType> From<MultiPoint<f64>> for GenericMultipoint<PointType> where
PointType: From<Point<f64>> + HasXY,
[src]
PointType: From<Point<f64>> + HasXY,
fn from(mp: MultiPoint<f64>) -> Self
[src]
impl From<GenericMultipoint<Point>> for Shape
[src]
fn from(concrete: Multipoint) -> Self
[src]
impl From<GenericMultipoint<PointM>> for Shape
[src]
fn from(concrete: MultipointM) -> Self
[src]
impl From<GenericMultipoint<PointZ>> for Shape
[src]
fn from(concrete: MultipointZ) -> Self
[src]
Auto Trait Implementations
impl<PointType> Unpin for GenericMultipoint<PointType> where
PointType: Unpin,
PointType: Unpin,
impl<PointType> Sync for GenericMultipoint<PointType> where
PointType: Sync,
PointType: Sync,
impl<PointType> Send for GenericMultipoint<PointType> where
PointType: Send,
PointType: Send,
impl<PointType> UnwindSafe for GenericMultipoint<PointType> where
PointType: UnwindSafe,
PointType: UnwindSafe,
impl<PointType> RefUnwindSafe for GenericMultipoint<PointType> where
PointType: RefUnwindSafe,
PointType: RefUnwindSafe,
Blanket Implementations
impl<S> ReadableShape for S where
S: ConcreteReadableShape,
[src]
S: ConcreteReadableShape,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,