Skip to content

KBE3D / KBCore / turf / booleanEqual

函数: booleanEqual()

booleanEqual(feature1: Geometry | Feature<any, GeoJsonProperties>, feature2: Geometry | Feature<any, GeoJsonProperties>, options?: { precision?: number; }): boolean

Function

Determine whether two geometries of the same type have identical X,Y coordinate values. See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm

参数

feature1

GeoJSON input

Geometry | Feature<any, GeoJsonProperties>

feature2

GeoJSON input

Geometry | Feature<any, GeoJsonProperties>

options?

Optional parameters

precision?

number

decimal precision to use when comparing coordinates

返回

boolean

true if the objects are equal, false otherwise

示例

ts
var pt1 = turf.point([0, 0]);
var pt2 = turf.point([0, 0]);
var pt3 = turf.point([1, 1]);

turf.booleanEqual(pt1, pt2);
//= true
turf.booleanEqual(pt2, pt3);
//= false

KBE3D @3.0.0 Copyright © 2024-present KBE3D