booleanParallel
描述
🌐 Description
Boolean-Parallel 如果 line1 的每个段与 line2 的相应段平行,则返回 True
🌐 Boolean-Parallel returns True if each segment of line1 is parallel to the correspondent segment of line2
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| line1 | Geometry | Feature<LineString> | GeoJSON 特性或几何 |
| line2 | Geometry | Feature<LineString> | GeoJSON 特性或几何 |
返回
🌐 Returns
boolean 如果这些直线平行,则为真/假
示例
🌐 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(...);