Package Exports
- turf-polygon
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turf-polygon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
turf-polygon
Creates a geojson polygon Feature based on a coordinate array. Properties can be added optionally.
var polygon = require('turf-polygon')
var poly1 = polygon([[[20.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]]])
var poly2 = polygon([[[20.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]]],
{name: 'line 1', distance: 145})
console.log(poly1)
console.log(poly2)