Enum h3o::geom::ContainmentMode
source · #[non_exhaustive]pub enum ContainmentMode {
ContainsCentroid,
ContainsBoundary,
IntersectsBoundary,
}
Expand description
Containment mode used to decide if a cell is contained in a polygon or not.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ContainsCentroid
This mode will select every cells whose centroid are contained inside the polygon.
This is the fasted option and ensures that every cell is uniquely assigned (e.g. two adjacent polygon with zero overlap also have zero overlapping cells).
On the other hand, some cells may cover area outside of the polygon (overshooting) and some parts of the polygon may be left uncovered.
ContainsBoundary
This mode will select every cells whose boundaries are entirely within the polygon.
This ensures that every cell is uniquely assigned (e.g. two adjacent polygon with zero overlap also have zero overlapping cells) and avoids any coverage overshooting.
Some parts of the polygon may be left uncovered (more than with
ContainsCentroid
).
IntersectsBoundary
This mode will select every cells whose boundaries are within the polygon, even partially.
This guarantees a complete coverage of the polygon, but some cells may belong to two different polygons if they are adjacent/close enough. Some cells may cover area outside of the polygon.
Trait Implementations§
source§impl Clone for ContainmentMode
impl Clone for ContainmentMode
source§fn clone(&self) -> ContainmentMode
fn clone(&self) -> ContainmentMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContainmentMode
impl Debug for ContainmentMode
source§impl PartialEq<ContainmentMode> for ContainmentMode
impl PartialEq<ContainmentMode> for ContainmentMode
source§fn eq(&self, other: &ContainmentMode) -> bool
fn eq(&self, other: &ContainmentMode) -> bool
self
and other
values to be equal, and is used
by ==
.