Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

linestring-intersect

mediasuitenz123MIT1.0.3

Determines whether any of the segments of 2 given linestrings intersect

linestring, intersect, line, intersection, coordinates, coords

readme

linestring-intersect

NPM

Media Suite

Build Status

Determines whether any of the segments of 2 given linestrings intersect

Description

The module iterates over each of the indices of lineA and uses robust segment intersect to determine if it intersects with any of the indices of lineB. If there is an intersection detected anywhere, the module will return true, otherwise false.

Usage Example

var intersect = require('linestring-intersect')

var lineA = [
  [172.6747204,-43.5559636],
  [172.6786703,-43.5564511],
  [172.6800085,-43.5565891]
]
var lineB = [
  [172.6732733,-43.5558003],
  [172.6747204,-43.5559636]
]

intersect(lineA, lineB) //true