Skip to main content

Crate geometry_trait

Crate geometry_trait 

Source
Expand description

Geometry concepts as Rust traits. One trait per doc/concept/*.qbk.

Mirrors boost/geometry/core/{access,tag,coordinate_type, coordinate_dimension,coordinate_system}.hpp and the boost/geometry/geometries/concepts/*_concept.hpp headers.

v1 surface — only the Geometry super-trait and the Point concept land here. Subsequent tasks add Box, Segment, Linestring, Ring, Polygon, and the multi / collection concepts as siblings of Point.

Modules§

corner
Indices used when addressing the two corners of a Box.

Structs§

BoxTag
2D or 3D axis-aligned box (mbr / aabb) identifying tag — boost/geometry/core/tags.hpp:103.
GeometryCollectionTag
OGC Geometry Collection identifying tag — boost/geometry/core/tags.hpp:122.
LinestringTag
OGC Linestring identifying tag — boost/geometry/core/tags.hpp:94.
MultiLinestringTag
OGC MultiLinestring identifying tag — boost/geometry/core/tags.hpp:116.
MultiPointTag
OGC MultiPoint identifying tag — boost/geometry/core/tags.hpp:113.
MultiPolygonTag
OGC MultiPolygon identifying tag — boost/geometry/core/tags.hpp:119.
PointTag
OGC Point identifying tag — boost/geometry/core/tags.hpp:91.
PolygonTag
OGC Polygon identifying tag — boost/geometry/core/tags.hpp:97.
PolyhedralSurfaceTag
OGC Polyhedral surface identifying tag — boost/geometry/core/tags.hpp:109.
RingTag
Convenience linear ring identifying tag — boost/geometry/core/tags.hpp:100.
SegmentTag
Convenience segment (2-points) identifying tag — boost/geometry/core/tags.hpp:106.

Enums§

Closure
Whether a ring repeats its first point as its last.
PointOrder
Vertex traversal direction of a ring’s boundary.

Traits§

Areal
Areal category marker — counterpart of areal_tag (boost/geometry/core/tags.hpp:75).
Box
An axis-aligned bounding box.
Geometry
Every modelled geometry has a kind (its tag) and a point type it is built from.
GeometryCollection
A collection of geometries belonging to each other.
IndexedAccess
Two-axis (Index, Dimension) access for geometries built out of a pair of corner points — Box and Segment.
Linear
Linear category marker — counterpart of linear_tag (boost/geometry/core/tags.hpp:69).
Linestring
A linestring — an ordered sequence of >= 2 points.
Multi
Multi-geometry marker — counterpart of multi_tag (boost/geometry/core/tags.hpp:63).
MultiLinestring
A multi-linestring — a collection of linestrings belonging to each other (e.g. a highway with interruptions).
MultiPoint
A multi-point — a collection of points belonging to each other.
MultiPolygon
A multi-polygon — a collection of polygons belonging to each other (e.g. Hawaii).
Point
The Point concept.
PointMut
The mutating half of the Point concept.
Pointlike
Point-like category marker — counterpart of pointlike_tag (boost/geometry/core/tags.hpp:66).
Polygon
A polygon — an exterior ring plus zero or more interior rings.
Polygonal
Polygonal category marker — counterpart of polygonal_tag : areal_tag (boost/geometry/core/tags.hpp:78). The C++ inheritance is expressed as a Rust super-trait bound, so T: Polygonal automatically implies T: Areal.
PolyhedralSurface
A polyhedral surface — a contiguous collection of polygons in 3-dimensional space that share common boundary segments.
Polylinear
Polylinear category marker — counterpart of polylinear_tag : linear_tag (boost/geometry/core/tags.hpp:72). The C++ inheritance is expressed as a Rust super-trait bound, so T: Polylinear automatically implies T: Linear.
Ring
A ring — an ordered sequence of points whose first and last either coincide (Closure::Closed) or are implicitly connected (Closure::Open).
SameAs
T: SameAs<U> holds iff T and U are the same type.
Segment
A two-point segment.
Single
Single-geometry marker — counterpart of single_tag (boost/geometry/core/tags.hpp:59).
Volumetric
Volumetric category marker — counterpart of volumetric_tag (boost/geometry/core/tags.hpp:81).

Functions§

box_max
Materialise the maximum corner of a box as a crate::Point value.
box_min
Materialise the minimum corner of a box as a crate::Point value.
check_box
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_geometry_collection
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_indexed_access
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_linestring
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_multi_linestring
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_multi_point
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_multi_polygon
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_point
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_polygon
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_polyhedral_surface
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_ring
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
check_segment
Call this in a unit test next to your type definition to surface adaptation errors close to the source rather than at the algorithm call site.
fold_dims
Fold a closure over the dimensions 0, 1, …, P::DIM - 1 of a Point at compile time.
segment_end
Materialise the end endpoint of a segment as a Point value.
segment_start
Materialise the start endpoint of a segment as a Point value.