An open API service indexing awesome lists of open source software.

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

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).