r_tree 1.0.0 copy "r_tree: ^1.0.0" to clipboard
r_tree: ^1.0.0 copied to clipboard

outdatedDart 1 only

A recursive RTree library written in Dart.

#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.

8
likes
0
pub points
76%
popularity

Publisher

verified publisherworkiva.com

A recursive RTree library written in Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on r_tree