Skip to main content

Crate geometres

Crate geometres 

Source
Expand description

Exact, non-constructive computational geometry over f64 coordinates. Provides the validated geometry types, exact DE-9IM topological predicates, validation, and certified measurements, backed by adaptive floating-point arithmetic from the arithmetica crate.

§What this crate does, and what it does not

Every public function does one of three things: it validates, it decides a predicate exactly, or it returns a quantity whose sign is certified and whose magnitude has a documented bound (ops::area, ops::length, accum::Accum). No public function returns a coordinate that is not an input coordinate.

Algorithms that construct new coordinates (the planar arrangement, rounding to f64, overlay, offset, centroid, tessellation) are built on top of this crate and vouch their results with its primitives. The exact, accum and codec modules are the public surface they use.

§Format neutrality

This crate takes coordinates as f64 values and returns geometric results. It has no knowledge of GIS file formats, coordinate reference systems, or geographic features.

Re-exports§

pub use error::GeometryError;
pub use types::Coord2d;
pub use types::CoordSeq;
pub use types::LineString;
pub use types::LinearRing;
pub use types::MultiLineString;
pub use types::MultiPoint;
pub use types::MultiPolygon;
pub use types::Point;
pub use types::Polygon;
pub use types3d::Coord3d;3d
pub use types3d::CoordSeq3d;3d
pub use types3d::LineString3d;3d
pub use types3d::LinearRing3d;3d
pub use types3d::MultiPolygon3d;3d
pub use types3d::Point3d;3d
pub use types3d::Polygon3d;3d

Modules§

accum
Compensated accumulation of sums and dot products.
codec
Native binary serialization for geometres types.
error
Geometry construction and validation errors.
exact
Exact ring- and segment-level primitives, public for crates built on this one.
index
Candidate filters over the parts and the edges of a polygonal value.
ops
Non-predicate geometric operations: area, length, validation, simplicity and vouched simplification (simplify).
predicates
The OGC spatial predicates, for any pair of geometries.
prepared
Prepared polygonal masks for repeated predicate queries (ADR-29).
topology
Exact topology: DE-9IM computation and the labeling types it produces.
types
Geometry types owned by geometres.
types3d3d
3D geometry types, available only under feature = "3d".