Module geo
Public package module for geo-d.
geo-d provides small, robust, coordinate-system-independent primitives and algorithms for two-dimensional Euclidean geometry.
Import this module to access the supported public API:
import geo;
The public API includes:
- points, vectors, segments, unbounded lines, and bounds; - non-owning polyline, linear-ring, and polygon views; - scalar conversion and explicit floating-point quantization; - axis-aligned geometry bounds; - distance, vector metric/directional, and nearest-point operations; - robust orientation and segment/line intersection predicates; - signed and polygon area; - point-in-polygon classification; - ring and polygon topology validation; - reduced exact polygon-to-polygon relationship classification; - robust one-dimensional segment-to-polygon clipping construction; - regularized polygon-union construction with immutable owning results; - Douglas-Peucker polyline simplification.
Numerical topology is deliberately separated from rounded geometric construction. Robust predicates do not use a global epsilon.
geo-d does not provide coordinate reference systems, projections, ellipsoidal or geodesic calculations, raster processing, spatial indexes, or geospatial file-format support.
Input variable-size geometry is represented by non-owning views. Constructed operations may return explicit owning immutable results when output size is data dependent. Low-level numerical operations avoid hidden allocation; algorithms requiring variable temporary storage document that requirement explicitly.
Date
September 27, 2026
Aliases
| Name | Type | Description |
|---|---|---|
LinearRingView
|
LinearRing2View
|
Deprecated v1 spelling of LinearRing2View.
|
Orientation
|
Orientation2
|
Deprecated v1 spelling of Orientation2.
|
PolygonView
|
Polygon2View
|
Deprecated v1 spelling of Polygon2View.
|
PolylineView
|
Polyline2View
|
Deprecated v1 spelling of Polyline2View.
|