Composable spatial data structures for JavaScript.
Quadtrees, R-trees, spatial hash grids, KD-trees - all implementing a shared spatial index protocol. Learn one API, pick the data structure that fits your problem. Swap implementations without rewriting your code.
| Package | Test | Version | Description |
|---|---|---|---|
@gridworkjs/core |
Geometry primitives (point, rect, circle) and spatial index protocol | ||
@gridworkjs/quadtree |
Quadtree spatial index for sparse, uneven point and region data | ||
@gridworkjs/rtree |
R-tree spatial index with bulk loading for rectangles and polygons | ||
@gridworkjs/hashgrid |
Spatial hash grid for uniform distributions and fast neighbor lookups | ||
@gridworkjs/kd |
KD-tree for static point sets and nearest-neighbor queries | ||
@gridworkjs/query |
Higher-level queries (radius, KNN, ray, within) against any index |
This ecosystem is an experiment in AI-maintained open source. All packages are autonomously built, tested, and refined by AI with human oversight. Regular audits, thorough test coverage, continuous refinement - the emphasis is on high quality, rigorously tested, production-grade code.