turf-polygon
turf polygon module
Last updated 12 years ago by morganherlocker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install turf-polygon 
SYNC missed versions from official npm registry.

turf-polygon

build status

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.<Number>> - an array of LinearRings
properties Object - an optional properties object

Example

var polygon = turf.polygon([[
 [-2.275543, 53.464547],
 [-2.275543, 53.489271],
 [-2.215118, 53.489271],
 [-2.215118, 53.464547],
 [-2.275543, 53.464547]
]], { name: 'poly1', population: 400});

//=polygon

//=polygon.properties

Installation

Requires nodejs.

$ npm install turf-polygon

Tests

$ npm test

Current Tags

  • 1.0.3                                ...           latest (12 years ago)

6 Versions

  • 1.0.3                                ...           12 years ago
  • 1.0.2                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           13 years ago
Downloads
Total 29
Today 0
This Week 2
This Month 23
Last Day 0
Last Week 8
Last Month 6
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE