Socket
Socket
Sign inDemoInstall

turf-polygon

Package Overview
Dependencies
0
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    turf-polygon

turf polygon module


Version published
Maintainers
8
Install size
6.84 kB
Created

Readme

Source

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

parametertypedescription
ringsArray.<Array.>- an array of LinearRings
propertiesObject- 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

Keywords

FAQs

Last updated on 06 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc