Skip to content

KBE3D / KBCore / turf / booleanParallel

函数: booleanParallel()

booleanParallel(line1: LineString | Feature<LineString, GeoJsonProperties>, line2: LineString | Feature<LineString, GeoJsonProperties>): boolean

Function

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

参数

line1

GeoJSON Feature or Geometry

LineString | Feature<LineString, GeoJsonProperties>

line2

GeoJSON Feature or Geometry

LineString | Feature<LineString, GeoJsonProperties>

返回

boolean

true/false if the lines are parallel

示例

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

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

KBE3D @3.0.0 Copyright © 2024-present KBE3D