import * as equalsOperator from "@arcgis/core/geometry/operators/equalsOperator.js";
const equalsOperator = await $arcgis.import("@arcgis/core/geometry/operators/equalsOperator.js");
@arcgis/core/geometry/operators/equalsOperator
Performs a relational operation to determine if two 2D geometries are topologically equal.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | equalsOperator |
Property Details
-
supportsCurves
supportsCurves Booleanreadonly
-
Indicates if the operator supports input geometries that contain curves.
- Default Value:true
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Accelerate a geometry. | equalsOperator | ||
Perform the equals operation on two geometries. | equalsOperator |
Method Details
-
accelerateGeometry
accelerateGeometry(geometry){Boolean}
-
Accelerate a geometry. This method prepares the geometry for faster equals operations when the same geometry is tested multiple times (e.g. in a loop with hundreds of iterations). See the Acceleration guide topic for more information.
Parametergeometry GeometryUnionThe geometry to accelerate.
ReturnsType Description Boolean Returns true
if the geometry was successfully accelerated.
-
execute
execute(geometry1, geometry2){Boolean}
-
Perform the equals operation on two geometries. The number of vertices and ordering of the vertices is not considered.
Parametersgeometry1 GeometryUnionThe first geometry.
geometry2 GeometryUnionThe second geometry.
ReturnsType Description Boolean Returns true
if the two geometries are topologically equal.Example// Returns true if two geometries are equal const isEqual = equalOperator.execute(polyline1, polyline2);