Skip to main content
Version: Next

booleanDisjoint

Description

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

Parameters

NameTypeDescription
feature1Geometry | Feature<any>GeoJSON Feature or Geometry
feature2Geometry | Feature<any>GeoJSON Feature or Geometry
options?ObjectOptional parameters (default {})
options.ignoreSelfIntersections?booleanignores self-intersections on input features (default false)

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