[−][src]Trait shapefile::record::MultipointShape
Trait that allows access to the slice of points of shapes that
have multiple points (all the shapes except Point
, PointM
, PoinZ
shapes.
Required methods
fn point<I: SliceIndex<[PointType]>>(
&self,
index: I
) -> Option<&<I as SliceIndex<[PointType]>>::Output>
&self,
index: I
) -> Option<&<I as SliceIndex<[PointType]>>::Output>
fn points(&self) -> &[PointType]
Returns a non mutable slice to the points
Exmaples
use shapefile::record::{MultipointShape, Polyline}; let file_path = "tests/data/line.shp"; let polylines = shapefile::read_as::<&str, Polyline>(file_path).unwrap(); let first = &polylines[0]; for point in first.points() { println!("{}, {}", point.x, point.y); }
use shapefile::record::{MultipointShape, PolylineZ}; let file_path = "tests/data/linez.shp"; let polylines = shapefile::read_as::<&str, PolylineZ>(file_path).unwrap(); let first = &polylines[0]; for point in first.points() { println!("{} {} {}", point.x, point.y, point.z); }
Implementors
impl MultipointShape<PointZ> for Multipatch
[src]
impl MultipointShape<PointZ> for Multipatch
fn point<I: SliceIndex<[PointZ]>>( | [src] |
fn points(&self) -> &[PointZ] | [src] |
impl<PointType> MultipointShape<PointType> for GenericMultipoint<PointType>
[src]
impl<PointType> MultipointShape<PointType> for GenericMultipoint<PointType>
fn point<I: SliceIndex<[PointType]>>( | [src] |
fn points(&self) -> &[PointType] | [src] |
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> MultipointShape<PointType> for GenericPolyline<PointType>
[src]
impl<PointType> MultipointShape<PointType> for GenericPolyline<PointType>
fn point<I: SliceIndex<[PointType]>>( | [src] |
fn points(&self) -> &[PointType] | [src] |