Rtree
=====

Whether for in-memory feature stores, Plone content, or whatever -- we need an
index to speed up the search for objects that intersect with a spatial bounding
box.

See also CHANGES.txt_.

.. _CHANGES.txt: http://trac.gispython.org/projects/PCL/browser/Rtree/trunk/CHANGES.txt

Rtree for maemo
---------------

The spatialindex library was modified to have the minimum required size to run the python-rtree.

The python-rtree module was improved to include the following new features:
  * contains method
  * Rtree read attributes:
	- height
	- size
	- nodes
  * add method will accept a bounding box or point only (omiting the index)
  * intersection, contains and nearest now accept a sort and a region parameter


Index Protocol
--------------

In a nutshell::

  >>> from rtree import Rtree
  >>> index = Rtree()
  >>> index.add(id=id, bounds=(left, bottom, right, top))
  >>> [n for n in index.intersection((left, bottom, right, top))]
  [id]

This resembles a subset of the set protocol. *add* indexes a new object by id,
*intersection* returns an iterator over ids where the node containing the id
intersects with the specified bounding box.  The *intersection* method is
exact, with no false positives and no missed data. Ids can be ints or long
ints; index queries return long ints.


Installation
------------

  $ ./bootstrap
  $ ./configure; make; make install


Support
-------

For current information about this project, see the wiki_.

.. _wiki: http://trac.gispython.org/projects/PCL/wiki/RTree

If you have questions, please consider joining our community list:

http://trac.gispython.org/projects/PCL/wiki/CommunityList

