Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-line-slice

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-line-slice

[![build status](https://secure.travis-ci.org/Turfjs/turf-line-slice.png)](http://travis-ci.org/Turfjs/turf-line-slice)

  • 1.3.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

turf-line-slice

build status

turf.line-slice (Point, Point, Line)

Slices a LineString at start and stop Points

Parameters

parametertypedescription
PointPointto start the slice
PointPointto stop the slice
LineLineStringto slice

Example

var line = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [
        -77.0316696166992,
        38.878605901789236
      ],
      [
        -77.02960968017578,
        38.88194668656296
      ],
      [
        -77.02033996582031,
        38.88408470638821
      ],
      [
        -77.02566146850586,
        38.885821800123196
      ],
      [
        -77.02188491821289,
        38.88956308852534
      ],
      [
        -77.01982498168944,
        38.89236892551996
      ]
    ]
  }
};
var start = turf.point([-77.02033996582031, 38.88408470638821]);
var stop = turf.point([-77.02033996582031, 38.88408470638821]);

var sliced = turf.lineSlice(start, stop, line);
//=sliced

Installation

Requires nodejs.

$ npm install turf-line-slice

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