# booleanEqual

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
判断相同类型的两个几何图形是否具有相同的X、Y坐标值。参见http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm

> npm install @turf/boolean-equal

参数

参数 类型 描述
feature1 (Geometry|Feature) GeoJSON input
feature2 (Geometry|Feature) GeoJSON input

返回

boolean - 如果对象相等,则返回true,否则返回false

示例

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
Last Updated: 4/10/2024, 11:27:54 PM