quadtree

geospatial quadtree encoding and decoding.

npm install quadtree
9 downloads in the last week
42 downloads in the last month

node-quadtree

Description

Quadtree is a node module that encodes and decodes geospatial quadtrees.

The encoding algorithm orders the tiles using the bing maps ordering shown below:

Quadtree ordering

Installation

$ npm install quadtree

Example

var quadtree = require('quadtree');

var coordinate = {
    lng: -27.093364,
    lat: -109.367523 
};

var precision = 8;
var encoded = quadtree.encode(coordinate, precision);

var decoded = quadtree.decode(encoded);

Contributors

Pair programmed by Roy Lines and James Bloomer.

npm loves you