pub enum VectorGeometry<M: Clone + Default = MValue> {
Point(VectorPointGeometry<M>),
MultiPoint(VectorMultiPointGeometry<M>),
LineString(VectorLineStringGeometry<M>),
MultiLineString(VectorMultiLineStringGeometry<M>),
Polygon(VectorPolygonGeometry<M>),
MultiPolygon(VectorMultiPolygonGeometry<M>),
}
Expand description
All possible geometry shapes
Variants§
Point(VectorPointGeometry<M>)
Point Shape
MultiPoint(VectorMultiPointGeometry<M>)
MultiPoint Shape
LineString(VectorLineStringGeometry<M>)
LineString Shape
MultiLineString(VectorMultiLineStringGeometry<M>)
MultiLineString Shape
Polygon(VectorPolygonGeometry<M>)
Polygon Shape
MultiPolygon(VectorMultiPolygonGeometry<M>)
MultiPolygon Shape
Implementations§
Source§impl<M: Clone + Default> VectorGeometry<M>
impl<M: Clone + Default> VectorGeometry<M>
Sourcepub fn point(&self) -> Option<&VectorPoint<M>>
pub fn point(&self) -> Option<&VectorPoint<M>>
Get the geometry point
Sourcepub fn new_point(coordinates: VectorPoint<M>, bbox: Option<BBox3D>) -> Self
pub fn new_point(coordinates: VectorPoint<M>, bbox: Option<BBox3D>) -> Self
Create a new point
Sourcepub fn multipoint(&self) -> Option<&VectorMultiPoint<M>>
pub fn multipoint(&self) -> Option<&VectorMultiPoint<M>>
Get the geometry multi point
Sourcepub fn new_multipoint(
coordinates: VectorMultiPoint<M>,
bbox: Option<BBox3D>,
) -> Self
pub fn new_multipoint( coordinates: VectorMultiPoint<M>, bbox: Option<BBox3D>, ) -> Self
Create a new multipoint
Sourcepub fn linestring(&self) -> Option<&VectorLineString<M>>
pub fn linestring(&self) -> Option<&VectorLineString<M>>
Get the geometry linestring
Sourcepub fn new_linestring(
coordinates: VectorLineString<M>,
bbox: Option<BBox3D>,
) -> Self
pub fn new_linestring( coordinates: VectorLineString<M>, bbox: Option<BBox3D>, ) -> Self
Create a new linestring
Sourcepub fn multilinestring(&self) -> Option<&VectorMultiLineString<M>>
pub fn multilinestring(&self) -> Option<&VectorMultiLineString<M>>
Get the geometry multilinestring
Sourcepub fn new_multilinestring(
coordinates: VectorMultiLineString<M>,
bbox: Option<BBox3D>,
) -> Self
pub fn new_multilinestring( coordinates: VectorMultiLineString<M>, bbox: Option<BBox3D>, ) -> Self
Create a new multilinestring
Sourcepub fn polygon(&self) -> Option<&VectorPolygon<M>>
pub fn polygon(&self) -> Option<&VectorPolygon<M>>
Get the geometry polygon
Sourcepub fn new_polygon(coordinates: VectorPolygon<M>, bbox: Option<BBox3D>) -> Self
pub fn new_polygon(coordinates: VectorPolygon<M>, bbox: Option<BBox3D>) -> Self
Create a new polygon
Sourcepub fn multipolygon(&self) -> Option<&VectorMultiPolygon<M>>
pub fn multipolygon(&self) -> Option<&VectorMultiPolygon<M>>
Get the geometry multipolygon
Sourcepub fn new_multipolygon(
coordinates: VectorMultiPolygon<M>,
bbox: Option<BBox3D>,
) -> Self
pub fn new_multipolygon( coordinates: VectorMultiPolygon<M>, bbox: Option<BBox3D>, ) -> Self
Create a new multipolygon
Sourcepub fn set_tess(&mut self, tessellation: Vec<f64>)
pub fn set_tess(&mut self, tessellation: Vec<f64>)
set the tessellation of the geometry (polygon and multipolygon only)
Sourcepub fn set_indices(&mut self, indices: Vec<u32>)
pub fn set_indices(&mut self, indices: Vec<u32>)
set the indices of the geometry (polygon and multipolygon only)
Sourcepub fn to_m_geometry(&self) -> VectorGeometry<MValue>where
M: MValueCompatible,
pub fn to_m_geometry(&self) -> VectorGeometry<MValue>where
M: MValueCompatible,
Convert the geometry so that all m-values are MValue rather then user defined
Trait Implementations§
Source§impl<M: Clone + Clone + Default> Clone for VectorGeometry<M>
impl<M: Clone + Clone + Default> Clone for VectorGeometry<M>
Source§fn clone(&self) -> VectorGeometry<M>
fn clone(&self) -> VectorGeometry<M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<M> Serialize for VectorGeometry<M>
impl<M> Serialize for VectorGeometry<M>
impl<M: Clone + Default> StructuralPartialEq for VectorGeometry<M>
Auto Trait Implementations§
impl<M> Freeze for VectorGeometry<M>where
M: Freeze,
impl<M> RefUnwindSafe for VectorGeometry<M>where
M: RefUnwindSafe,
impl<M> Send for VectorGeometry<M>where
M: Send,
impl<M> Sync for VectorGeometry<M>where
M: Sync,
impl<M> Unpin for VectorGeometry<M>where
M: Unpin,
impl<M> UnwindSafe for VectorGeometry<M>where
M: UnwindSafe,
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