s2-index
v0.0.0
Published
s2 powered index utilities
Downloads
12
Readme
s2-index
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.