# davidmoten/rtree

Immutable in-memory R-tree and R*-tree implementations in Java with reactive api

Repository: https://github.com/davidmoten/rtree
Canonical: https://ross.abutalabs.com/products/rtree
Language: Java
License: Apache-2.0
License Family: permissive
Last push: 2026-07-30T11:22:38+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 8, longevity 100
- inputs: {"age_days": 4390, "days_push": 34, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1141, forks 218 (observed 2026-08-28T04:03:44.560643+00:00)

## What it is
An immutable in-memory 2D R-tree and R*-tree spatial index library for Java, using structural sharing for thread-safe insertions and deletions. Search results are exposed via RxJava Observables with backpressure support, and it includes STR bulk loading for fast index creation.

## Use cases
- index geographic points for fast bounding-box queries in Java
- build a thread-safe spatial index that can be shared across threads without locks
- bulk-load millions of 2D geometries into a spatial index quickly
- stream spatial search results reactively with backpressure
- implement nearest-neighbour search over 2D data
- customize R-tree splitting and selection heuristics for a specific workload

## When to choose
- you need an immutable, concurrency-friendly spatial index on the JVM
- you want reactive (RxJava) processing of spatial query results
- you need fast bulk loading of large 2D datasets
- you want pluggable R-tree or R*-tree heuristics

## When to avoid
- you need a disk-backed or persistent spatial index
- you need 3D or higher-dimensional indexing
- you prefer the newer non-reactive API — use rtree2 instead
- you need geospatial features beyond pure spatial indexing, like projections or geocoding

## Facets
- artifact type: library
- maturity: stable
- function: search-engine, data-science
- domain: developer-tools
- platform: jvm
- tags: rtree, spatial-index, immutable-data-structures, rxjava, reactive, in-memory, 2d-geometry, algorithms, geospatial

## Member repositories
- davidmoten/rtree (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:44.560643+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:35:23.414045+00:00, confidence not recorded.
  - readme: https://github.com/davidmoten/rtree (fetched 2026-08-28T04:03:44.560643+00:00, sha 6889d8b049ae)
- Data as of 2026-08-30T08:39:29.467469+00:00.
