Crate spade[][src]

Spade

Spade (SPAtial Data structurEs, obviously!) implements a few nifty data structures optimized for spatial access operations.

Features

  • An n-dimensional r*-tree: spade::rtree::RTree
  • A 2D Delaunay triangulation: spade::delaunay::DelaunayTriangulation
    • Supports integral and floating point coordinates as input
    • Uses exact predicates to avoid floating point rounding issues, see spade::kernels::FloatKernel
    • Natural neighbor interpolation
    • Can be backed up by an r*-tree to improve performance when inserting randomly distributed points
    • Supports vertex removal
  • A 2D constrained Delaunay triangulation: spade::delaunay::ConstrainedDelaunayTriangulation
  • Supports serde. Activate the serde_serialize feature to enable (de)serialization of r*-trees, (constrained) Delaunay triangulations and primitives.

Supported point types

Spade works well with points from the nalgebra and cgmath packages. Also, fixed size arrays of size 2, 3 and 4 are supported. Also own vector types can be defined. Please note that, due to the way cargo resolves dependencies, there might be issues when using spade combined with cgmath or nalgebra: every time spade updates these libraries, the using code must be update too, even if spade would still work with the older version. To avoid this, consider switching to fixed size arrays as points until public / private dependencies make their way into cargo.

Modules

delaunay

A two dimensional Delaunay triangulation.

kernels

Calculation kernels.

primitives

Contains some useful primitives that can be inserted into r-trees.

rtree

Implementation of an n-dimensional r*-tree.

Structs

BoundingRect

An axis aligned minimal bounding rectangle.

Traits

HasPosition

An object that has a position.

HasPosition2D

An object with a two dimensional position.

PointN

Abstraction over a point with a fixed number of dimensions.

SpadeFloat

Floating point types that can be used with spade.

SpadeNum

Number types that can be used with spade.

SpatialObject

Describes objects that can be located by r-trees.

ThreeDimensional

A three dimensional Point.

TwoDimensional

A two dimensional Point.