GisForWeb
Menu
All tools
Rtree logo

Rtree

Open Source

Python spatial index wrapping libspatialindex, with R-tree queries and bulk loading.

License

MIT

About

Rtree is a ctypes wrapper around libspatialindex that gives Python a real spatial index instead of scanning every geometry. It supports nearest-neighbor and intersection queries, multi-dimensional indexes, clustered indexes that store JSON-like objects alongside entries, bulk loading, deletion and disk serialization, plus custom storage backends such as ZODB. Current releases ship binary wheels bundling libspatialindex 2.1, require Python 3.9 or newer, and support Windows, Linux and macOS including Apple silicon.

Features

  • Nearest neighbor and intersection queries
  • Bulk loading, including NumPy arrays
  • Clustered indexes storing objects inline
  • Disk serialization and custom storage backends
  • Multi-dimensional indexes beyond 2D
  • R-tree and TPR-tree index variants

Details

Type
Library
Pricing
open-source
License
MIT
API
sdk
Hosting
Self-host

Platforms

linux
macos
windows

Languages

Python
C++