turf-polygon
turf polygon module
turf.polygon(rings, properties)
Takes an array of LinearRings and optionally an Object with properties and returns a GeoJSON Polygon feature.
Parameters
parameter | type | description |
---|---|---|
rings |
Array.<Array.> | - an array of LinearRings |
properties |
Object | - an optional properties object |
Example
var polygon = turf; //=polygon //=polygon.properties
Installation
Requires nodejs.
$ npm install turf-polygon
Tests
$ npm test