pub struct PolygonizeResult {
pub polygons: Vec<PolygonFeature>,
pub num_components: usize,
pub width: usize,
pub height: usize,
}Expand description
Result of raster polygonization.
Fields§
§polygons: Vec<PolygonFeature>Extracted polygon features, one per connected component.
num_components: usizeNumber of connected components found (excluding nodata).
width: usizeGrid width in pixels.
height: usizeGrid height in pixels.
Implementations§
Source§impl PolygonizeResult
impl PolygonizeResult
Sourcepub fn polygons_for_value(
&self,
value: f64,
tolerance: f64,
) -> Vec<&PolygonFeature>
pub fn polygons_for_value( &self, value: f64, tolerance: f64, ) -> Vec<&PolygonFeature>
Get all polygons for a specific pixel value.
Sourcepub fn to_multipolygon(&self) -> MultiPolygon
pub fn to_multipolygon(&self) -> MultiPolygon
Collect all polygons into a MultiPolygon.
Sourcepub fn unique_values(&self) -> Vec<f64>
pub fn unique_values(&self) -> Vec<f64>
Get unique pixel values present in the result.
Trait Implementations§
Source§impl Clone for PolygonizeResult
impl Clone for PolygonizeResult
Source§fn clone(&self) -> PolygonizeResult
fn clone(&self) -> PolygonizeResult
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 moreAuto Trait Implementations§
impl Freeze for PolygonizeResult
impl RefUnwindSafe for PolygonizeResult
impl Send for PolygonizeResult
impl Sync for PolygonizeResult
impl Unpin for PolygonizeResult
impl UnsafeUnpin for PolygonizeResult
impl UnwindSafe for PolygonizeResult
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