josephswanson-wf / r_tree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RTree Build Status

A recursive RTree library written in Dart.

"R-trees are tree data structures used for spatial access methods, i.e., for indexing multi-dimensional information such as geographical coordinates, rectangles or polygons." - http://en.wikipedia.org/wiki/R-tree

API

  • RTree ( [ Number branch_factor ] )

Parameters:

  • branch_factor : optional : The maximum width of a node before a split is performed1.

Returns:

  • An empty RTree object.

RTree.insert

  • insert ( RTreeDatum2 item )

Parameters:

  • item : required : An item to insert into the tree.

RTree.remove

  • remove ( RTreeDatum2 item )

Parameters:

  • item : required : An item to remove from the RTree.

RTree.search

  • search ( Rectangle area )

Parameters:

  • area : required : An area to search within.

Returns:

  • An Iterable<RTreeDatum<E>> of objects that overlap area.
  • Note: Rectangles that simply share a border are not considered to overlap.

Notes

1 Default max node width is currently 16.

2 RTreeDatum is simply a way to bind a Rectangle to an Object.

About

License:Other


Languages

Language:Dart 97.9%Language:Dockerfile 2.1%