Skip to content

Commit

Permalink
Add some docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Oct 25, 2024
1 parent 996cb46 commit 65b936c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions geo/src/algorithm/bool_ops/i_overlay_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub trait BoolOpsCoord<T>: Copy {
fn y(&self) -> T;
}

/// A geometry coordinate number suitable for performing geometric boolean operations.
pub trait BoolOpsNum: GeoNum {
type CoordType: BoolOpsCoord<Self>;
type OverlayType: BoolOpsOverlay<CoordType = Self::CoordType>;
Expand Down
7 changes: 7 additions & 0 deletions geo/src/algorithm/bool_ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ use crate::geometry::{LineString, MultiLineString, MultiPolygon, Polygon};
pub trait BooleanOps {
type Scalar: BoolOpsNum;

/// The exterior and interior rings of the geometry.
///
/// It doesn't particularly matter which order they are in, as the topology algorithm counts crossings
/// to determine the interior and exterior of the polygon.
///
/// It is required that the rings are from valid geometries, that the rings not overlap.
/// In the case of a MultiPolygon, this requires that none of its polygon's interiors may overlap.
fn rings(&self) -> impl Iterator<Item = &LineString<Self::Scalar>>;

fn boolean_op(
Expand Down

0 comments on commit 65b936c

Please sign in to comment.