extents

0.0.0 • Public • Published

extents

Compute the extents around a polygon.

Extents are like a bounding box, only decomposed into west, south, north, and east values instead of 2 or 4 points.

build status

example

var extents = require('extents');
var polygon = [
    [ 37.96, -122.45 ],
    [ 37.95, -122.90 ],
    [ 38.21, -122.62 ]
];
var ex = extents(polygon);
console.dir(ex);

{ w: -122.9, s: 37.95, e: -122.45, n: 38.21 }

methods

var extents = require('extents')

extents(polygon)

Compute the extents object for polygon. The polygon object should be an array of 2-item [lat,lon] arrays.

install

With npm do:

npm install extents

license

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i extents

Weekly Downloads

2

Version

0.0.0

License

MIT

Last publish

Collaborators

  • nopersonsmodules