pub struct PointM {
pub x: f64,
pub y: f64,
pub m: f64,
}Expand description
Point with x, y, m
Fields§
§x: f64§y: f64§m: f64Implementations§
Source§impl PointM
impl PointM
Sourcepub fn new(x: f64, y: f64, m: f64) -> Self
pub fn new(x: f64, y: f64, m: f64) -> Self
Creates a new pointM
§Examples
use shapefile::PointM;
let point = PointM::new(1.0, 42.0, 13.37);
assert_eq!(point.x, 1.0);
assert_eq!(point.y, 42.0);
assert_eq!(point.m, 13.37);use shapefile::{PointM, NO_DATA};
let point = PointM::default();
assert_eq!(point.x, 0.0);
assert_eq!(point.y, 0.0);
assert_eq!(point.m, NO_DATA);Trait Implementations§
Source§impl ConcreteReadableShape for PointM
impl ConcreteReadableShape for PointM
Source§impl CoordTrait for &PointM
impl CoordTrait for &PointM
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
Dimensions of the coordinate tuple
Source§fn nth_or_panic(&self, n: usize) -> Self::T
fn nth_or_panic(&self, n: usize) -> Self::T
Access the n’th (0-based) element of the CoordinateTuple.
May panic if n >= DIMENSION.
See also
nth().Source§impl CoordTrait for PointM
impl CoordTrait for PointM
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
Dimensions of the coordinate tuple
Source§fn nth_or_panic(&self, n: usize) -> Self::T
fn nth_or_panic(&self, n: usize) -> Self::T
Access the n’th (0-based) element of the CoordinateTuple.
May panic if n >= DIMENSION.
See also
nth().Source§impl GeometryTrait for &PointM
impl GeometryTrait for &PointM
Source§type PointType<'b> = &PointM
where
Self: 'b
type PointType<'b> = &PointM where Self: 'b
The type of each underlying Point, which implements PointTrait
Source§type LineStringType<'b> = UnimplementedLineString<<&PointM as GeometryTrait>::T>
where
Self: 'b
type LineStringType<'b> = UnimplementedLineString<<&PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying LineString, which implements LineStringTrait
Source§type PolygonType<'b> = UnimplementedPolygon<<&PointM as GeometryTrait>::T>
where
Self: 'b
type PolygonType<'b> = UnimplementedPolygon<<&PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying Polygon, which implements PolygonTrait
Source§type MultiPointType<'b> = UnimplementedMultiPoint<<&PointM as GeometryTrait>::T>
where
Self: 'b
type MultiPointType<'b> = UnimplementedMultiPoint<<&PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPoint, which implements MultiPointTrait
Source§type MultiLineStringType<'b> = UnimplementedMultiLineString<<&PointM as GeometryTrait>::T>
where
Self: 'b
type MultiLineStringType<'b> = UnimplementedMultiLineString<<&PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiLineString, which implements MultiLineStringTrait
Source§type MultiPolygonType<'b> = UnimplementedMultiPolygon<<&PointM as GeometryTrait>::T>
where
Self: 'b
type MultiPolygonType<'b> = UnimplementedMultiPolygon<<&PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPolygon, which implements MultiPolygonTrait
Source§type GeometryCollectionType<'b> = UnimplementedGeometryCollection<<&PointM as GeometryTrait>::T>
where
Self: 'b
type GeometryCollectionType<'b> = UnimplementedGeometryCollection<<&PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying GeometryCollection, which implements GeometryCollectionTrait
Source§type RectType<'b> = UnimplementedRect<f64>
where
Self: 'b
type RectType<'b> = UnimplementedRect<f64> where Self: 'b
The type of each underlying Rect, which implements RectTrait
Source§type LineType<'b> = UnimplementedLine<f64>
where
Self: 'b
type LineType<'b> = UnimplementedLine<f64> where Self: 'b
The type of each underlying Line, which implements LineTrait
Source§type TriangleType<'b> = UnimplementedTriangle<f64>
where
Self: 'b
type TriangleType<'b> = UnimplementedTriangle<f64> where Self: 'b
The type of each underlying Triangle, which implements TriangleTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
The dimension of this geometry
Source§fn as_type(
&self,
) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
fn as_type( &self, ) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
Cast this geometry to a
GeometryType enum, which allows for downcasting to a specific
typeSource§impl GeometryTrait for PointM
impl GeometryTrait for PointM
Source§type PointType<'b> = PointM
where
Self: 'b
type PointType<'b> = PointM where Self: 'b
The type of each underlying Point, which implements PointTrait
Source§type LineStringType<'b> = UnimplementedLineString<<PointM as GeometryTrait>::T>
where
Self: 'b
type LineStringType<'b> = UnimplementedLineString<<PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying LineString, which implements LineStringTrait
Source§type PolygonType<'b> = UnimplementedPolygon<<PointM as GeometryTrait>::T>
where
Self: 'b
type PolygonType<'b> = UnimplementedPolygon<<PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying Polygon, which implements PolygonTrait
Source§type MultiPointType<'b> = UnimplementedMultiPoint<<PointM as GeometryTrait>::T>
where
Self: 'b
type MultiPointType<'b> = UnimplementedMultiPoint<<PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPoint, which implements MultiPointTrait
Source§type MultiLineStringType<'b> = UnimplementedMultiLineString<<PointM as GeometryTrait>::T>
where
Self: 'b
type MultiLineStringType<'b> = UnimplementedMultiLineString<<PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiLineString, which implements MultiLineStringTrait
Source§type MultiPolygonType<'b> = UnimplementedMultiPolygon<<PointM as GeometryTrait>::T>
where
Self: 'b
type MultiPolygonType<'b> = UnimplementedMultiPolygon<<PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPolygon, which implements MultiPolygonTrait
Source§type GeometryCollectionType<'b> = UnimplementedGeometryCollection<<PointM as GeometryTrait>::T>
where
Self: 'b
type GeometryCollectionType<'b> = UnimplementedGeometryCollection<<PointM as GeometryTrait>::T> where Self: 'b
The type of each underlying GeometryCollection, which implements GeometryCollectionTrait
Source§type RectType<'b> = UnimplementedRect<f64>
where
Self: 'b
type RectType<'b> = UnimplementedRect<f64> where Self: 'b
The type of each underlying Rect, which implements RectTrait
Source§type LineType<'b> = UnimplementedLine<f64>
where
Self: 'b
type LineType<'b> = UnimplementedLine<f64> where Self: 'b
The type of each underlying Line, which implements LineTrait
Source§type TriangleType<'b> = UnimplementedTriangle<f64>
where
Self: 'b
type TriangleType<'b> = UnimplementedTriangle<f64> where Self: 'b
The type of each underlying Triangle, which implements TriangleTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
The dimension of this geometry
Source§fn as_type(
&self,
) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
fn as_type( &self, ) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
Cast this geometry to a
GeometryType enum, which allows for downcasting to a specific
typeSource§impl PointTrait for &PointM
impl PointTrait for &PointM
Source§impl PointTrait for PointM
impl PointTrait for PointM
Source§impl WritableShape for PointM
impl WritableShape for PointM
impl ConcreteShape for PointM
impl Copy for PointM
impl StructuralPartialEq for PointM
Auto Trait Implementations§
impl Freeze for PointM
impl RefUnwindSafe for PointM
impl Send for PointM
impl Sync for PointM
impl Unpin for PointM
impl UnsafeUnpin for PointM
impl UnwindSafe for PointM
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more