booleanIntersects
Description
Boolean-intersects returns (TRUE) two geometries intersect.
Parameters
Name | Type | Description |
---|---|---|
feature1 | Geometry | Feature<any> | GeoJSON Feature or Geometry |
feature2 | Geometry | Feature<any> | GeoJSON Feature or Geometry |
Returns
boolean true/false
Examples
var point = turf.point([2, 2]);
var line = turf.lineString([
[1, 1],
[1, 2],
[1, 3],
[1, 4],
]);
turf.booleanIntersects(line, point);
//=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(...);