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

booleanTouches

Quick answer

Boolean-touches true if none of the points common to both geometries intersect the interiors of both geometries.

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

Description​

Boolean-touches true if none of the points common to both geometries intersect the interiors of both geometries.

Parameters​

NameTypeDescription
feature1Geometry | Feature<any>GeoJSON Feature or Geometry
feature2Geometry | Feature<any>GeoJSON Feature or Geometry

Returns​

boolean true/false

Examples​

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

turf.booleanTouches(point, line);
//=true

Installation​

$ npm install @turf/boolean-touches

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

import * as turf from "@turf/turf";
const result = turf.booleanTouches(...);
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/booleanTouches · Chinese note: /turf/api/boolean-touches.html
Cite this page

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