Skip to content

KBE3D / KBCore / turf / booleanTouches

函数: booleanTouches()

booleanTouches(feature1: Geometry | Feature<any, GeoJsonProperties>, feature2: Geometry | Feature<any, GeoJsonProperties>): boolean

Function

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

参数

feature1

GeoJSON Feature or Geometry

Geometry | Feature<any, GeoJsonProperties>

feature2

GeoJSON Feature or Geometry

Geometry | Feature<any, GeoJsonProperties>

返回

boolean

true/false

示例

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

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

KBE3D @3.0.0 Copyright © 2024-present KBE3D