Skip to main content
Version: 7.1.0

booleanParallel

Description

Boolean-Parallel returns True if each segment of line1 is parallel to the correspondent segment of line2

Parameters

NameTypeDescription
line1Geometry | Feature<LineString>GeoJSON Feature or Geometry
line2Geometry | Feature<LineString>GeoJSON Feature or Geometry

Returns

    boolean true/false if the lines are parallel

Examples

var line1 = turf.lineString([
[0, 0],
[0, 1],
]);
var line2 = turf.lineString([
[1, 0],
[1, 1],
]);

turf.booleanParallel(line1, line2);
//=true

Installation

$ npm install @turf/boolean-parallel

import { booleanParallel } from "@turf/boolean-parallel";
const result = booleanParallel(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.booleanParallel(...);