# History of Rtree

Rtree was started by Sean Gillies as a port of the libspatialindex linkages that QGIS maintained to provide on-the-fly indexing support for GUI operations. A notable feature of R-trees is the ability to insert data into the structure without the need for a global partitioning bounds, and this drove Sean’s adoption of this code. Howard Butler later picked up Rtree and added a number of features that libspatialindex provided including disk serialization and bulk loading by writing a C API for libspatialindex and re-writing Rtree as a ctypes wrapper to utilize this C API. Brent Pedersen came along and added features to support alternative coordinate ordering, augmentation of the pickle storage, and lots of documentation. Mattias (http://dr-code.org) added support for custom storage backends to support using Rtree as an indexing type in ZODB.

Rtree has gone through a number of iterations, and at 0.5.0, it was completely refactored to use a new internal architecture (ctypes + a C API over libspatialindex). This refactoring has resulted in a number of new features and much more flexibility. See Changes for more detail.

Note

A significant bug in the 1.6.1+ libspatialindex C API was found where it was using unsigned integers for index entry IDs instead of signed integers. Because Rtree appeared to be the only significant user of the C API at this time, it was corrected immediately. You should update immediately and re-insert data into new indexes if this is an important consideration for your application.

Rtree 0.5.0 included a C library that is now the C API for libspatialindex and is part of that source tree. The code bases are independent from each other and can now evolve separately. Rtree is pure Python as of 0.6.0+.