https://github.com/daniel-j-h/geozbush
A very fast spatial index for geographic locations based on a Z-Order space filling curve
https://github.com/daniel-j-h/geozbush
algorithm computational-geometry geospatial index javascript kd-tree openstreetmap r-tree space-filling-curve spatial-index z-order z-order-index
Last synced: about 2 months ago
JSON representation
A very fast spatial index for geographic locations based on a Z-Order space filling curve
- Host: GitHub
- URL: https://github.com/daniel-j-h/geozbush
- Owner: daniel-j-h
- License: mit
- Created: 2025-05-18T16:20:32.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-18T16:27:47.000Z (5 months ago)
- Last Synced: 2025-08-24T14:43:57.324Z (2 months ago)
- Topics: algorithm, computational-geometry, geospatial, index, javascript, kd-tree, openstreetmap, r-tree, space-filling-curve, spatial-index, z-order, z-order-index
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GeoZBush
A very fast spatial index for geographic locations based on a Z-Order space filling curve.
Related:
1. For a cloud-native parquet-based point index see [zindex](https://github.com/daniel-j-h/zindex)
2. For an arbitrary point index in 2D see [zbush](https://github.com/daniel-j-h/zbush/)
## Installation
We publish this project as the package [geozbush](https://www.npmjs.com/package/geozbush) on NPM
```
npm install geozbush
```
## Usage
```ts
const index = new GeoZBush();
for (const {lng, lat} of items) {
index.add(lng, lat);
}
index.finish();
const foundIds = index.range(minlng, minlat, maxlng, maxlat);
```
## Release
Checklist
- [ ] Bump version in `package.json`
- [ ] Tag the release `git tag vx.y.z -a`
- [ ] Push the tag `git push origin vx.y.z`
There is a GitHub Action publishing to the [zbush package](https://www.npmjs.com/package/zbush) on NPM with provenance attestation.
## License
Copyright © 2025 Daniel J. H.
Distributed under the MIT License (MIT).