Atlaslog
Atlaslog / Turf.js / API / booleanIntersects
Turf.js · API reference

booleanIntersects

Quick answer

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

Last verified 2026-11-03 · Turf.js 7.x · Cite this page
Runnable examplesChinese noteAll API topics

Description​

Boolean-intersects returns (TRUE) if the intersection of the two geometries is NOT 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?booleanignore self-intersections on input features (default true)

Returns​

boolean true if geometries intersect, false otherwise

Examples​

var point1 = turf.point([2, 2]);
var point2 = turf.point([1, 2]);
var line = turf.lineString([
[1, 1],
[1, 3],
[1, 4],
]);

turf.booleanIntersects(line, point1);
//=false

turf.booleanIntersects(line, point2);
//=true

Installation​

$ npm install @turf/boolean-intersects

import { booleanIntersects } from "@turf/boolean-intersects";
const result = booleanIntersects(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.booleanIntersects(...);
TutorialsAPI index
English reference text adapted from the official Turf.js documentation, © Turf.js contributors, licensed under MIT.
Original page: https://turfjs.org/docs/api/booleanIntersects · Chinese note: /turf/api/boolean-intersects.html
Cite this page

Atlaslog (2026). booleanIntersects. https://www.jingweizhi.com/en/turf/api/boolean-intersects.html (accessed 2026-11-03).