turf bboxPolygon module
Takes a bbox and returns an equivalent Polygon|polygon.
parameter | type | description |
---|---|---|
bbox |
Array.<number> | an Array of bounding box coordinates in the form: [xLow, yLow, xHigh, yHigh] |
var bbox = [0, 0, 10, 10];
var poly = turf.bboxPolygon(bbox);
//=poly
Returns Feature.<Polygon>
, a Polygon representation of the bounding box
Requires nodejs.
$ npm install turf-bbox-polygon
$ npm test