booleanParallel
描述
¥Description
Boolean-Parallel returns True if each segment of line1
is parallel to the correspondent segment of line2
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
line1 | 几何图形 | 特性<LineString> | GeoJSON 要素或几何体 |
line2 | 几何图形 | 特性<LineString> | GeoJSON 要素或几何体 |
返回
¥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(...);