booleanDisjoint
描述
¥Description
Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
feature1 | 几何图形 | 特性<任意> | GeoJSON 要素或几何体 |
feature2 | 几何图形 | 特性<任意> | GeoJSON 要素或几何体 |
options? | 对象 | 可选参数(默认 ) |
options.ignoreSelfIntersections? | boolean | ignore self-intersections on input features (default true) |
返回
¥Returns
boolean true if the intersection is an empty set, false otherwise
示例
¥Examples
var point = turf.point([2, 2]);
var line = turf.lineString([
[1, 1],
[1, 2],
[1, 3],
[1, 4],
]);
turf.booleanDisjoint(line, point);
//=true
安装
¥Installation
$ npm install @turf/boolean-disjoint
import { booleanDisjoint } from "@turf/boolean-disjoint";
const result = booleanDisjoint(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.booleanDisjoint(...);