GithubHelp home page GithubHelp logo

isabella232 / spade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bhickey/spade

0.0 0.0 0.0 5.31 MB

Spatial Data Structures for Rust

License: Apache License 2.0

Makefile 0.08% Rust 99.92%

spade's Introduction

Build Status Docs Crates.io

spade

Spade (SPAtial DatastructurEs, obviously!) implements a few nifty data structures for spatial access operations:

  • An n-dimensional r*-tree for efficient nearest-neighbor and point lookup queries
  • 2D Delaunay triangulation, optionally backed by an r-tree for faster insertion and nearest neighbor lookup
  • 2D constrained Delaunay triangulation (CDT)

Some other noteworthy features:

All structures are purely written in rust, the package currently supports vectors from the nalgebra and cgmath packages. However, using these packages is not required.

Compatibility note

Spade complies with semantic versioning, and since it is past its 1.0 version, current minor version changes will be backward compatible. However, 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 happily with the older versions. To avoid this, consider switching to fixed size arrays as points until public / private dependencies make their way into cargo.

Documentation

The documentation can be found under docs.rs. There is also a user guide available.

Project state

I (the main developer) am currently working on splitting up this package into smaller packages (for rtrees and delaunay triangulations), along with some larger API changes. Thus, I won't add large features to spade. However, I will still be monitoring pull requests and try to implement smaller, easily fixable tasks - please do not hesitate to open an appropriate issue!

Examples

R-Tree

This image shows the structure of an r*-tree with some points inserted in a circular pattern. Points are shown as blue dots, the tree's directory nodes are displayed as boxes of different colors (depending on their depth in the tree). Note that the implementation tries prevent any boxes from overlapping, resulting in faster query performance. You can find this example in /examples/interactivedemo, run it with cargo run rtree.

An example R-Tree with a few inserted points

CDT

CDT's are usual Delaunay triangulations with a few "fixed" edges: An example of a CDT

Interpolation

The user guide has a an own chapter about interpolation, along with some nice images. An example showcasing spade's interpolation features can be found in /examples/nninterpolation, run it with cargo run.

Performance

The user guide contains detailed graphs and information about the delaunay triangulation's performance.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

spade's People

Contributors

stoeoef avatar adeschamps avatar davechallis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.