pub enum VectorGeometry<M = Map<String, ValueType>>{
Point(VectorBaseGeometry<VectorPoint<M>>),
MultiPoint(VectorBaseGeometry<Vec<VectorPoint<M>>, f64>),
LineString(VectorBaseGeometry<Vec<VectorPoint<M>>, f64>),
MultiLineString(VectorBaseGeometry<Vec<Vec<VectorPoint<M>>>, Vec<f64>>),
Polygon(VectorBaseGeometry<Vec<Vec<VectorPoint<M>>>, Vec<f64>>),
MultiPolygon(VectorBaseGeometry<Vec<Vec<Vec<VectorPoint<M>>>>, Vec<Vec<f64>>>),
}Expand description
§Vector Geometry
§Description
All possible geometry shapes. Builds ontop of VectorBaseGeometry.
§Usage
VectorGeometry::bbox: Get the bbox of the geometryVectorGeometry::vec_bbox: Get the internal 0-1 clipping style vector bboxVectorGeometry::point: Get the geometry pointVectorGeometry::new_point: Create a new pointVectorGeometry::multipoint: Get the geometry multi pointVectorGeometry::new_multipoint: Create a new multipointVectorGeometry::linestring: Get the geometry line stringVectorGeometry::new_linestring: Create a new linestringVectorGeometry::multilinestring: Get the geometry multi line stringVectorGeometry::new_multilinestring: Create a new multi line stringVectorGeometry::polygon: Get the geometry polygonVectorGeometry::new_polygon: Create a new polygonVectorGeometry::multipolygon: Get the geometry multi polygonVectorGeometry::new_multipolygon: Create a new multi polygonVectorGeometry::set_tess: Set the tessellation of the geometry (polygon and multipolygon only)VectorGeometry::set_indices: Set the indices of the geometry (polygon and multipolygon only)VectorGeometry::to_m_geometry: Convert the geometry so that all m-values are MValue rather then user defined
Variants§
Point(VectorBaseGeometry<VectorPoint<M>>)
Point Shape
MultiPoint(VectorBaseGeometry<Vec<VectorPoint<M>>, f64>)
MultiPoint Shape
LineString(VectorBaseGeometry<Vec<VectorPoint<M>>, f64>)
LineString Shape
MultiLineString(VectorBaseGeometry<Vec<Vec<VectorPoint<M>>>, Vec<f64>>)
MultiLineString Shape
Polygon(VectorBaseGeometry<Vec<Vec<VectorPoint<M>>>, Vec<f64>>)
Polygon Shape
MultiPolygon(VectorBaseGeometry<Vec<Vec<Vec<VectorPoint<M>>>>, Vec<Vec<f64>>>)
MultiPolygon Shape
Implementations§
Source§impl<M> VectorGeometry<M>
impl<M> 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>,
) -> VectorGeometry<M>
pub fn new_point( coordinates: VectorPoint<M>, bbox: Option<BBox3D>, ) -> VectorGeometry<M>
Create a new point
Sourcepub fn multipoint(&self) -> Option<&Vec<VectorPoint<M>>>
pub fn multipoint(&self) -> Option<&Vec<VectorPoint<M>>>
Get the geometry multi point
Sourcepub fn new_multipoint(
coordinates: Vec<VectorPoint<M>>,
bbox: Option<BBox3D>,
) -> VectorGeometry<M>
pub fn new_multipoint( coordinates: Vec<VectorPoint<M>>, bbox: Option<BBox3D>, ) -> VectorGeometry<M>
Create a new multipoint
Sourcepub fn linestring(&self) -> Option<&Vec<VectorPoint<M>>>
pub fn linestring(&self) -> Option<&Vec<VectorPoint<M>>>
Get the geometry linestring
Sourcepub fn new_linestring(
coordinates: Vec<VectorPoint<M>>,
bbox: Option<BBox3D>,
) -> VectorGeometry<M>
pub fn new_linestring( coordinates: Vec<VectorPoint<M>>, bbox: Option<BBox3D>, ) -> VectorGeometry<M>
Create a new linestring
Sourcepub fn multilinestring(&self) -> Option<&Vec<Vec<VectorPoint<M>>>>
pub fn multilinestring(&self) -> Option<&Vec<Vec<VectorPoint<M>>>>
Get the geometry multilinestring
Sourcepub fn new_multilinestring(
coordinates: Vec<Vec<VectorPoint<M>>>,
bbox: Option<BBox3D>,
) -> VectorGeometry<M>
pub fn new_multilinestring( coordinates: Vec<Vec<VectorPoint<M>>>, bbox: Option<BBox3D>, ) -> VectorGeometry<M>
Create a new multilinestring
Sourcepub fn new_polygon(
coordinates: Vec<Vec<VectorPoint<M>>>,
bbox: Option<BBox3D>,
) -> VectorGeometry<M>
pub fn new_polygon( coordinates: Vec<Vec<VectorPoint<M>>>, bbox: Option<BBox3D>, ) -> VectorGeometry<M>
Create a new polygon
Sourcepub fn multipolygon(&self) -> Option<&Vec<Vec<Vec<VectorPoint<M>>>>>
pub fn multipolygon(&self) -> Option<&Vec<Vec<Vec<VectorPoint<M>>>>>
Get the geometry multipolygon
Sourcepub fn new_multipolygon(
coordinates: Vec<Vec<Vec<VectorPoint<M>>>>,
bbox: Option<BBox3D>,
) -> VectorGeometry<M>
pub fn new_multipolygon( coordinates: Vec<Vec<Vec<VectorPoint<M>>>>, bbox: Option<BBox3D>, ) -> VectorGeometry<M>
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) -> VectorGeometrywhere
M: MValueCompatible,
pub fn to_m_geometry(&self) -> VectorGeometrywhere
M: MValueCompatible,
Convert the geometry so that all m-values are MValue rather then user defined
Trait Implementations§
Source§impl<M> Clone for VectorGeometry<M>
impl<M> 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> Debug for VectorGeometry<M>
impl<M> Debug for VectorGeometry<M>
Source§impl<M> Default for VectorGeometry<M>
impl<M> Default for VectorGeometry<M>
Source§fn default() -> VectorGeometry<M>
fn default() -> VectorGeometry<M>
Returns the “default value” for a type. Read more
Source§impl<D: MValueCompatible> From<&VectorGeometry<D>> for DrawType
impl<D: MValueCompatible> From<&VectorGeometry<D>> for DrawType
Source§fn from(geometry: &VectorGeometry<D>) -> DrawType
fn from(geometry: &VectorGeometry<D>) -> DrawType
Converts to this type from the input type.
Source§impl<M> PartialEq for VectorGeometry<M>
impl<M> PartialEq for VectorGeometry<M>
Source§impl<M> Serialize for VectorGeometry<M>
impl<M> Serialize for VectorGeometry<M>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<M> 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