Skip to main content

geometry_algorithm/
lib.rs

1//! Free-function algorithm entry points users actually call.
2//!
3//! Each function mirrors the matching free function in
4//! `boost/geometry/algorithms/`. T23 lands the strategy-dispatch layer
5//! for `distance` / `comparable_distance`; subsequent tasks add
6//! `length`, `area`, `envelope`, `within`, `intersects`, … on the same
7//! pattern (a strategy-less default plus a `_with` explicit-strategy
8//! companion).
9//!
10//! # References
11//!
12//! * `boost/geometry/algorithms/distance.hpp`
13//! * `boost/geometry/algorithms/comparable_distance.hpp`
14//! * `boost/geometry/algorithms/detail/distance/interface.hpp`
15
16#![cfg_attr(not(feature = "std"), no_std)]
17#![forbid(unsafe_code)]
18
19extern crate alloc;
20
21pub mod append;
22pub mod area;
23pub mod assign;
24pub mod azimuth;
25pub mod centroid;
26pub mod clear;
27pub mod closest_points;
28pub mod convert;
29pub mod convex_hull;
30pub mod correct;
31pub mod densify;
32pub mod discrete_frechet;
33pub mod discrete_hausdorff;
34pub mod disjoint;
35pub mod distance;
36pub mod envelope;
37pub mod equals;
38pub mod for_each;
39pub mod intersects;
40pub mod is_convex;
41pub mod is_empty;
42pub mod is_simple;
43pub mod length;
44pub mod line_interpolate;
45pub mod make;
46pub mod num_geometries;
47pub mod num_interior_rings;
48pub mod num_points;
49pub mod num_segments;
50pub mod remove_spikes;
51pub mod reverse;
52pub mod simplify;
53pub mod transform;
54pub mod unique;
55pub mod within;
56
57mod dyn_area;
58mod dyn_distance;
59mod dyn_envelope;
60mod dyn_error;
61mod dyn_length;
62mod dyn_within;
63
64pub use append::{append, append_to_ring};
65pub use area::{area, area_with, box_area, multi_polygon_area, ring_area};
66pub use assign::assign_values;
67pub use azimuth::{azimuth, azimuth_with};
68pub use centroid::{centroid, centroid_with};
69pub use clear::clear;
70pub use closest_points::closest_points;
71pub use convert::convert;
72pub use convex_hull::convex_hull;
73pub use correct::correct;
74pub use densify::densify;
75pub use discrete_frechet::{discrete_frechet_distance, discrete_frechet_distance_with};
76pub use discrete_hausdorff::{discrete_hausdorff_distance, discrete_hausdorff_distance_with};
77pub use disjoint::{disjoint, disjoint_box_box};
78pub use distance::{comparable_distance, distance, distance_with};
79pub use envelope::envelope;
80pub use equals::equals;
81pub use for_each::{for_each_point, for_each_segment};
82pub use intersects::{intersects, intersects_reversed};
83pub use is_convex::is_convex;
84pub use is_empty::is_empty;
85pub use is_simple::is_simple;
86pub use length::{length, length_with, perimeter, ring_perimeter};
87pub use line_interpolate::line_interpolate;
88pub use make::{make_box, make_point, make_segment};
89pub use num_geometries::num_geometries;
90pub use num_interior_rings::num_interior_rings;
91pub use num_points::num_points;
92pub use num_segments::num_segments;
93pub use remove_spikes::remove_spikes;
94pub use reverse::reverse;
95pub use simplify::simplify;
96pub use transform::transform;
97pub use unique::unique;
98pub use within::{covered_by, within};
99
100pub use dyn_area::area_dyn;
101pub use dyn_distance::distance_dyn;
102pub use dyn_envelope::envelope_dyn;
103pub use dyn_error::DynKindMismatch;
104pub use dyn_length::length_dyn;
105pub use dyn_within::within_dyn;