mourner/flatbush
A very fast static spatial index for 2D points and rectangles in JavaScript 🌱 observed · 2026-08-28
Health v2 · maintenance only
87/100
- Activity 91
- Release rhythm 75
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 34
- age_days: 3109
- days_rel: 85
- days_push: 56
- n_releases_24m: 6
Adoption not part of the score
1597 stars · 64 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Flatbush is a very fast static spatial index for 2D points and rectangles in JavaScript, implementing a packed Hilbert R-tree. It supports bounding-box and k-nearest-neighbor queries over millions of items, with the index stored as a single transferable array buffer.
Use cases
- index millions of rectangles for fast bounding box queries in JavaScript
- find k nearest neighbors to a point in a large 2D dataset
- speed up map rendering and hit-testing in data visualizations
- transfer a spatial index between web workers via a single array buffer
- serialize a compact binary spatial index to a file and reload it
- accelerate computational geometry algorithms like polygon intersection tests
- index geographic locations for spatial search with geoflatbush
When to choose
- your dataset is static or rebuilt infrequently and you need maximum indexing and query speed
- you need a low-memory spatial index that serializes to a single array buffer
- you query millions of points or rectangles for maps, charts, or geometry algorithms
- you want to transfer the index between threads or persist it compactly
When to avoid
- you need to add or remove items after building the index - use RBush instead
- you need dynamic incremental indexing with frequent updates
- you need 3D or higher-dimensional spatial indexing
- you need full-text or non-spatial search
Facets
library · maturity stable
search-engine geospatial data-visualization data-visualization web-development browser spatial-index r-tree hilbert-curve k-nearest-neighbors bounding-box-query computational-geometry static-index array-buffer zero-dependency geospatial algorithms maps javascript nodejs web-server
2 sources
- readme: https://github.com/mourner/flatbush · fetched 2026-08-28 · d550a3b7be29
- registry_npm: https://registry.npmjs.org/flatbush · fetched 2026-08-29 · 50ad2bfd74e2
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mourner/flatbush | main | 87 |
For agents
markdown · JSON · MCP: product_card(name="mourner/flatbush")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem