Expand description
Low-level segment and edge geometry primitives.
Used by ST_Contains, ST_Intersects, and ST_Distance. All operations are planar (coordinate-space), not spherical. This is correct for the small-area geometries typical of spatial predicates (city blocks, not hemispheres). For large-area work, haversine handles the globe.
Enums§
- Orientation
- Orientation of three points (collinear, clockwise, counter-clockwise). Uses the cross product of vectors (p→q) and (p→r).
Functions§
- on_
segment - Whether point q lies on segment p-r (given that p, q, r are collinear).
- orientation
- Compute orientation of ordered triplet (p, q, r).
- point_
on_ ring_ boundary - Whether a point lies on any edge of a polygon ring.
- point_
on_ segment - Whether a point lies exactly on a line segment (within epsilon tolerance).
- point_
to_ segment_ dist_ sq - Minimum squared distance from a point to a line segment.
- ring_
edges - Extract all edges from a polygon ring as segment pairs.
- segment_
to_ segment_ dist_ sq - Minimum squared distance between two line segments.
- segments_
intersect - Whether two segments (p1-q1) and (p2-q2) intersect.