Expand description
Free-function algorithm entry points users actually call.
Each function mirrors the matching free function in
boost/geometry/algorithms/. T23 lands the strategy-dispatch layer
for distance / comparable_distance; subsequent tasks add
length, area, envelope, within, intersects, … on the same
pattern (a strategy-less default plus a _with explicit-strategy
companion).
§References
boost/geometry/algorithms/distance.hppboost/geometry/algorithms/comparable_distance.hppboost/geometry/algorithms/detail/distance/interface.hpp
Re-exports§
pub use append::append;pub use append::append_to_ring;pub use area::area;pub use area::area_with;pub use area::box_area;pub use area::multi_polygon_area;pub use area::ring_area;pub use assign::assign_values;pub use azimuth::azimuth;pub use azimuth::azimuth_with;pub use centroid::centroid;pub use centroid::centroid_with;pub use clear::clear;pub use closest_points::closest_points;pub use convert::convert;pub use convex_hull::convex_hull;pub use correct::correct;pub use densify::densify;pub use discrete_frechet::discrete_frechet_distance;pub use discrete_frechet::discrete_frechet_distance_with;pub use discrete_hausdorff::discrete_hausdorff_distance;pub use discrete_hausdorff::discrete_hausdorff_distance_with;pub use disjoint::disjoint;pub use disjoint::disjoint_box_box;pub use distance::comparable_distance;pub use distance::distance;pub use distance::distance_with;pub use envelope::envelope;pub use equals::equals;pub use for_each::for_each_point;pub use for_each::for_each_segment;pub use intersects::intersects;pub use intersects::intersects_reversed;pub use is_convex::is_convex;pub use is_empty::is_empty;pub use is_simple::is_simple;pub use length::length;pub use length::length_with;pub use length::perimeter;pub use length::ring_perimeter;pub use line_interpolate::line_interpolate;pub use make::make_box;pub use make::make_point;pub use make::make_segment;pub use num_geometries::num_geometries;pub use num_interior_rings::num_interior_rings;pub use num_points::num_points;pub use num_segments::num_segments;pub use remove_spikes::remove_spikes;pub use reverse::reverse;pub use simplify::simplify;pub use transform::transform;pub use unique::unique;pub use within::covered_by;pub use within::within;
Modules§
- append
append(&mut g, point)and the ring-index variant.- area
area(&g)— seeboost/geometry/algorithms/area.hpp.- assign
- Write coordinates into a mutable geometry.
- azimuth
azimuth(&p1, &p2)— the bearing fromp1top2.- centroid
centroid(&g)— the geometric centre ofg.- clear
clear(&mut g)— empty the backing storage in place.- closest_
points closest_points(&a, &b) -> (Point, Point)— nearest-point pair.- convert
convert(src) -> Dst— typed conversions between equivalent geometry kinds.- convex_
hull convex_hull(&g) -> Ring<G::Point>— minimal enclosing ring.- correct
correct(&mut g)— fix ring closure and orientation in place.- densify
densify(g, max_distance)— insert intermediate points so no segment exceedsmax_distance.- discrete_
frechet discrete_frechet_distance(&l1, &l2)— DP table over the two point sequences.- discrete_
hausdorff discrete_hausdorff_distance(&l1, &l2)— sup-sup distance over vertex sets.- disjoint
disjoint(&a, &b)— seeboost/geometry/algorithms/disjoint.hpp.- distance
- User-facing
distance/distance_with/comparable_distanceentry points. - envelope
envelope(&g)— the axis-aligned bounding box ofg.- equals
equals(&a, &b)— seeboost/geometry/algorithms/equals.hpp.- for_
each - Geometry visitors —
for_each_pointandfor_each_segment. - intersects
intersects(&a, &b)— seeboost/geometry/algorithms/intersects.hpp.- is_
convex is_convex(&g) -> bool.- is_
empty is_empty(&g)— true iffnum_points(g) == 0.- is_
simple is_simple(&g) -> bool— OGC Simple Feature predicate.- length
length(&g)andperimeter(&p)— seeboost/geometry/algorithms/{length,perimeter}.hpp.- line_
interpolate line_interpolate(ls, t) -> Point— point at fractional arc-lengtht ∈ [0, 1]alongls.- make
- Construct a Point / Box / Segment from a coordinate slice.
- num_
geometries num_geometries(&g)— number of distinct geometries ing.- num_
interior_ rings num_interior_rings(&g)— Σ interior-ring counts.- num_
points num_points(&g)— total point count, recursive on multi / polygon kinds.- num_
segments num_segments(&g)— total edge count.- remove_
spikes remove_spikes(&mut g)— drop collinear-and-reversed vertices.- reverse
reverse(&mut g)— flip point order in place.- simplify
simplify(g, max_distance)— return a Douglas–Peucker-simplified copy ofg.- transform
transform(&g, &strategy)— return a fresh geometry whose every point has been mapped throughstrategy.- unique
unique(&mut g)— collapse consecutive duplicate points.- within
within(&p, &g)/covered_by(&p, &g)— point-in-geometry containment, seeboost/geometry/algorithms/within.hppandboost/geometry/algorithms/covered_by.hpp.
Structs§
- DynKind
Mismatch - Returned by
_dynwrappers when the input combination has no static algorithm impl.
Functions§
- area_
dyn - Runtime-dispatched signed area.
- distance_
dyn - Runtime-dispatched distance.
- envelope_
dyn - Runtime-dispatched envelope.
- length_
dyn - Runtime-dispatched length.
- within_
dyn - Runtime-dispatched point-in-polygon.