Skip to main content

Module spatial

Module spatial 

Source
Expand description

Spatial analysis primitives on S².

Pure geometry operating on SphericalPoint and [f64; 3] unit vectors. No embedding or category knowledge — those live in sphereql-embed.

Covers: antipodal maps, spherical cap areas and intersections, great circle arc geometry, spherical Voronoi tessellation, spherical excess, lune containment, and Monte Carlo coverage estimation.

Structs§

CoverageReport
Result of a sphere coverage analysis.
PairwiseOverlap
VoronoiCell
A cell in the spherical Voronoi diagram.

Enums§

LuneSide
Which side of an angular bisector a point falls on.

Functions§

angular_bisector_normal
Returns the unit normal of the angular bisector plane between a and b.
antipode
Returns the antipodal point of p on S² (angular distance π).
cap_exclusivity
Exclusivity: fraction of a cap’s area not overlapped by any other cap. Returns [0, 1]. 1.0 = fully exclusive.
cap_intersection_area
Solid angle of the intersection of two spherical caps.
cap_solid_angle
Solid angle of a spherical cap with half-angle alpha (radians).
curvature_signature
Curvature signature: distribution of spherical excesses across all triples that include the point at target. Sorted ascending.
distance_to_great_circle_arc
Angular distance from point to the nearest point on the great circle arc from arc_start to arc_end.
estimate_coverage
Estimates sphere coverage via Monte Carlo sampling.
geodesic_density_profile
Samples the great circle arc at num_samples equally spaced points and counts how many items in points lie within radius of each sample.
geodesic_deviation
Max angular distance from any interior path waypoint to the direct great circle arc between first and last waypoints.
geodesic_sweep
Finds all indices in points within epsilon radians of the great circle arc from arc_start to arc_end.
lune_classify
Determines which side of the angular bisector plane between a and b a point lies on.
pairwise_overlaps
Computes pairwise cap overlaps, sorted by descending intersection area.
region_coherence
Measures how coherently a set of points clusters near a target on S².
spherical_excess
Spherical excess (= area) of a triangle on S² with vertices a, b, c.
spherical_voronoi
Computes a spherical Voronoi tessellation from generator points.
void_distance
Angular distance from point to the nearest cap boundary.