# s2-index

> s2 powered index utilities

Latest version **0.0.0** (published 2014-05-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install s2-index
pnpm add s2-index
yarn add s2-index
bun add s2-index
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2014-05-09 |
| First published | 2014-05-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tom MacWright |
| Maintainers | tmcw |
| Keywords | geojson, s2, geometry |

## Links

- npm: https://www.npmjs.com/package/s2-index
- npm.io page: https://npm.io/package/s2-index

## Dependencies (1)

- [s2](https://npm.io/package/s2.md) ~0.2.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.0 (latest) — 2014-05-09

## README

# s2-index

[![Build Status](https://travis-ci.org/mapbox/s2-index.svg)](https://travis-ci.org/mapbox/s2-index)

Abstractions over [s2](https://github.com/mapbox/node-s2) to provide indexing
support for databases.

## install

    npm install --save s2-index

## example

```js
var s2index = require('s2-index');

s2index.point([0, 0], 0, 10).forEach(function(idx) {
    // insert into database with idx as key
});
```

## api

### `point(coords, min, max)`

Index a point from min to max S2 Cell levels.

### `polygon(coords, options)`

Index a polygon with options, same as in [s2](https://github.com/mapbox/node-s2).

---
_Source: https://npm.io/package/s2-index · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
