[][src]Enum shapefile::record::Shape

pub enum Shape {
    NullShape,
    Point(Point),
    PointM(PointM),
    PointZ(PointZ),
    Polyline(Polyline),
    PolylineM(PolylineM),
    PolylineZ(PolylineZ),
    Polygon(Polygon),
    PolygonM(PolygonM),
    PolygonZ(PolygonZ),
    Multipoint(Multipoint),
    MultipointM(MultipointM),
    MultipointZ(MultipointZ),
    Multipatch(Multipatch),
}

enum of Shapes that can be read or written to a shapefile

Variants

NullShapePoint(Point)PointM(PointM)PointZ(PointZ)Polyline(Polyline)PolylineM(PolylineM)PolylineZ(PolylineZ)Polygon(Polygon)PolygonM(PolygonM)PolygonZ(PolygonZ)Multipoint(Multipoint)MultipointM(MultipointM)MultipointZ(MultipointZ)Multipatch(Multipatch)

Methods

impl Shape[src]

pub fn shapetype(&self) -> ShapeType[src]

Returns the shapetype

Trait Implementations

impl HasShapeType for Shape[src]

impl ReadableShape for Shape[src]

impl From<Point> for Shape[src]

impl From<PointM> for Shape[src]

impl From<PointZ> for Shape[src]

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

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

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

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

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

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

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

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

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

impl From<Multipatch> for Shape[src]

impl Display for Shape[src]

impl TryFrom<Shape> for Geometry<f64>[src]

Tries to convert a shapefile's Shape into a geo_types::Geometry

This conversion can fail because the conversion of shapefile's polygons & multipatch into their geo_types counter parts can fail. And the NullShape has no equivalent Geometry;

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Geometry<f64>> for Shape[src]

Converts a Geometry to a Shape

Since all Geometries are in 2D, the resulting shape will be 2D (Polygon, Polyline, etc and not PolylineM, PolylineZ, etc)

Fails if the geometry is a GeometryCollection

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for Point[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for PointM[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for PointZ[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for Polyline[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for PolylineM[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for PolylineZ[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for Polygon[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for PolygonM[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for PolygonZ[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for Multipoint[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for MultipointM[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for MultipointZ[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Shape> for Multipatch[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl Sync for Shape

impl Unpin for Shape

impl Send for Shape

impl UnwindSafe for Shape

impl RefUnwindSafe for Shape

Blanket Implementations

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

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

impl<T> From<T> for 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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