Skip to main content
Version: 7.1.0

booleanTouches

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