0.0.0 • Published 10 years ago

s2-index v0.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
10 years ago

s2-index

Build Status

Abstractions over s2 to provide indexing support for databases.

install

npm install --save s2-index

example

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.