# mourner/rbush

RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles

Repository: https://github.com/mourner/rbush
Canonical: https://ross.abutalabs.com/products/rbush
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, r-tree, spatial-index, computational-geometry, algorithm
Last push: 2026-07-21T01:49:37+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 8, longevity 100
- inputs: {"age_days": 4809, "days_push": 44, "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 2770, forks 254 (observed 2026-08-28T04:07:18.849011+00:00)

## What it is
RBush is a high-performance JavaScript library providing a 2D spatial index for points and rectangles, built on an optimized R*-tree with bulk loading and insertion. It enables fast bounding-box queries, commonly used in maps and data visualizations.

## Use cases
- find all items within a bounding box quickly
- spatial indexing for map features
- collision detection for rectangles
- speed up hit-testing in canvas visualizations
- index geographic points for clustering
- bulk-load thousands of rectangles and query them

## When to choose
- you need fast 2D rectangle or point queries in JavaScript
- you have large datasets where linear scanning is too slow
- you want a dependency-free, well-tested spatial index

## When to avoid
- you need 3D or higher-dimensional indexing
- you need nearest-neighbor or k-d tree style queries out of the box
- you work outside JavaScript

## Facets
- artifact type: library
- maturity: stable
- function: search-engine, math, developer-tools
- domain: data-visualization, web-development
- platform: browser, cross-platform
- tags: r-tree, spatial-index, computational-geometry, bounding-box, bulk-loading, algorithms, maps, nodejs

## Member repositories
- mourner/rbush (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:18.849011+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-30T08:16:40.828786+00:00, confidence not recorded.
  - readme: https://github.com/mourner/rbush (fetched 2026-08-28T04:07:18.849011+00:00, sha f8d93ba11dbb)
  - registry_npm: https://registry.npmjs.org/rbush (fetched 2026-08-29T09:56:18.389938+00:00, sha 61323e0f865e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
