[][src]Struct shapefile::record::multipoint::GenericMultipoint

pub struct GenericMultipoint<PointType> {
    pub bbox: BBox,
    pub points: Vec<PointType>,
}

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]

impl<PointType> From<GenericMultipoint<PointType>> for MultiPoint<f64> where
    Point<f64>: From<PointType>, 
[src]

impl<PointType> From<MultiPoint<f64>> for GenericMultipoint<PointType> where
    PointType: From<Point<f64>> + HasXY
[src]

impl From<GenericMultipoint<Point>> for Shape[src]

impl From<GenericMultipoint<PointM>> for Shape[src]

impl From<GenericMultipoint<PointZ>> for Shape[src]

Auto Trait Implementations

impl<PointType> Sync for GenericMultipoint<PointType> where
    PointType: Sync

impl<PointType> Send for GenericMultipoint<PointType> where
    PointType: Send

impl<PointType> Unpin for GenericMultipoint<PointType> where
    PointType: Unpin

impl<PointType> RefUnwindSafe for GenericMultipoint<PointType> where
    PointType: RefUnwindSafe

impl<PointType> UnwindSafe for GenericMultipoint<PointType> where
    PointType: UnwindSafe

Blanket Implementations

impl<S> ReadableShape for S where
    S: ConcreteReadableShape
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]