From 79290f4eabb575bb2945427bfd52ee9263cae374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Fri, 1 Nov 2024 11:03:27 +0000 Subject: [PATCH] Doc improvements --- geo/src/algorithm/bool_ops/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/geo/src/algorithm/bool_ops/mod.rs b/geo/src/algorithm/bool_ops/mod.rs index 94d1317cc..81d4b1308 100644 --- a/geo/src/algorithm/bool_ops/mod.rs +++ b/geo/src/algorithm/bool_ops/mod.rs @@ -27,6 +27,12 @@ use rstar::{ParentNode, RTree, RTreeNode, RTreeObject}; /// In particular, taking `union` with an empty geom should remove degeneracies /// and fix invalid polygons as long the interior-exterior requirement above is /// satisfied. +/// +/// # Performance +/// +/// For union operations on a collection of overlapping and / or adjacent [`Polygon`]s +/// (e.g. contained in a `Vec` or a [`MultiPolygon`]), using [`UnaryUnion`] will +/// yield far better performance. pub trait BooleanOps { type Scalar: BoolOpsNum; @@ -126,7 +132,7 @@ pub enum OpType { Xor, } -/// Returns the [BooleanOps::union] of all contained geometries +/// Efficient [BooleanOps::union] of adjacent / overlapping geometries /// /// For geometries with a high degree of overlap or adjacency /// (for instance, merging a large contiguous area made up of many adjacent polygons)