require(["esri/geometry/operators/relateOperator"], (relateOperator) => { /* code goes here */ });
import * as relateOperator from "@arcgis/core/geometry/operators/relateOperator.js";
esri/geometry/operators/relateOperator
Performs a relational operation between two 2D geometries using the DE-9IM matrix encoded as a string. The DE-9IM matrix is a 3x3 matrix that describes the topological relationship between two geometries.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | relateOperator |
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. | relateOperator | ||
relateOperator | |||
Indicates if the DE-9IM matrix relation is valid. | relateOperator |
Method Details
-
accelerateGeometry
accelerateGeometry(geometry){Boolean}
-
Accelerate a geometry. This method prepares the geometry for faster relate operations when the same geometry is tested multiple times (e.g. in a loop with hundreds of iterations).
Parametergeometry GeometryUnionThe geometry to accelerate.
ReturnsType Description Boolean Returns true
if the geometry was successfully accelerated.
-
execute
execute(geometry1, geometry2, relation){Boolean}
-
Parametersgeometry1 GeometryUnion
The first geometry for the relation.
geometry2 GeometryUnionThe second geometry for the relation.
relation StringThe DE-9IM matrix relation encoded as a string to test against the relationship of the two geometries
ReturnsType Description Boolean Returns true
if the two geometries satisfy the DE-9IM matrix relation.Example// Returns true if the polygon geometry completely // contains the polyline based on the DE-9IM string const isRelated = relateOperator.execute(polygon, polyline, "TTTFFTFFT");