Skip to content

Commit

Permalink
add comment about stitching results with holes
Browse files Browse the repository at this point in the history
  • Loading branch information
RobWalt committed Jul 26, 2024
1 parent d21fa28 commit 039b16b
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion geo/src/algorithm/stitch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,43 @@ pub(crate) trait StitchTriangles<T: GeoFloat> {
///
/// # Additional Notes
///
/// Stitching triangles which result in a polygon with a hole which touches the outline
/// (mentioned here [banana polygon](https://postgis.net/workshops/postgis-intro/validity.html#repairing-invalidity))
/// will result in a single polygon without interiors instead of a polygon with a single
/// interior
///
/// ```
/// ┌────────x────────┐
/// │\....../ \....../│
/// │.\..../ \..../.│
/// │..\../ \../..│
/// │...\/ \/...│
/// │...───────────...│
/// │../\....^..../\..│
/// │./..\../.\../..\.│
/// │/....\/...\/....\│
/// └─────────────────┘
///
/// │ │ │
/// ▼ ▼ ▼
///
/// ┌────────x────────┐
/// │ / \ │
/// │ / \ │
/// │ / \ │
/// │ / \ │
/// │ ─────────── │
/// │ │
/// │ │
/// │ │
/// └─────────────────┘
/// ```
///
/// ---
///
/// If you want to do something more general like a
/// [`Boolean Operation Union`](https://en.wikipedia.org/wiki/Boolean_operations_on_polygons)
/// you should use the trait `BooleanOps` or `SpadeBoolops`.
/// you should use the trait [`BooleanOps`] or [`SpadeBoolops`].
fn stitch_triangulation(&self) -> TriangleStitchingResult<MultiPolygon<T>>;
}

Expand Down

0 comments on commit 039b16b

Please sign in to comment.