Skip to main content
Version: 7.3.0

booleanDisjoint

描述

🌐 Description

如果两个几何体的交集为空集,则 Boolean-disjoint 返回 (TRUE)。

🌐 Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.

参数

🌐 Parameters

名称类型描述
feature1Geometry | Feature<any>GeoJSON 特性或几何
feature2Geometry | Feature<any>GeoJSON 特性或几何
options?Object可选参数 (默认 {})
options.ignoreSelfIntersections?boolean忽略输入特性上的自相交 (默认 true)

返回

🌐 Returns

boolean 如果交集是空集则为真,否则为假

示例

🌐 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(...);