Socket
Socket
Sign inDemoInstall

turf-linestring

Package Overview
Dependencies
Maintainers
8
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-linestring

turf lineString module


Version published
Weekly downloads
7.6K
decreased by-13%
Maintainers
8
Weekly downloads
 
Created
Source

turf-linestring

build status

turf lineString module

turf.linestring(coordinates, properties)

Creates a LineString Feature based on a coordinate array. Properties can be added optionally.

Parameters

parametertypedescription
coordinatesArray.<Array.>- an array of Positions
propertiesObjectan Object consisting of key-value pairs to add as properties

Example

var linestring1 = turf.linestring([
	[-21.964416, 64.148203],
	[-21.956176, 64.141316],
	[-21.93901, 64.135924],
	[-21.927337, 64.136673]
]);
var linestring2 = turf.linestring([
	[-21.929054, 64.127985],
	[-21.912918, 64.134726],
	[-21.916007, 64.141016],
	[-21.930084, 64.14446]
], {name: 'line 1', distance: 145});

//=linestring1

//=linestring2

Installation

Requires nodejs.

$ npm install turf-linestring

Tests

$ npm test

Keywords

FAQs

Package last updated on 06 Feb 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc