▾
import { relateAccelerateGeometry, accelerateGeometry, relateExecute, execute, relateIsValidDE9IM } from "@arcgis/core/geometry/operators/relateOperator.js";const { relateAccelerateGeometry, accelerateGeometry, relateExecute, execute, relateIsValidDE9IM } = await $arcgis.import("@arcgis/core/geometry/operators/relateOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
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.
Functions
relateAccelerateGeometry
- Since
- ArcGIS Maps SDK for JavaScript 5.2
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). See the Acceleration guide topic for more information.
- Signature
-
relateAccelerateGeometry (geometry: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The geometry to accelerate. | |
- Returns
- boolean
Returns
trueif the geometry was successfully accelerated.
accelerateGeometry
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). See the Acceleration guide topic for more information.
- Signature
-
accelerateGeometry (geometry: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The geometry to accelerate. | |
- Returns
- boolean
Returns
trueif the geometry was successfully accelerated.
relateExecute
- Since
- ArcGIS Maps SDK for JavaScript 5.2
- Signature
-
relateExecute (geometry1: GeometryUnion, geometry2: GeometryUnion, relation: string): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry1 | The first geometry for the relation. | | |
| geometry2 | The second geometry for the relation. | | |
| relation | The DE-9IM matrix relation encoded as a string to test against the relationship of the two geometries | |
- Returns
- boolean
Returns
trueif 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 stringconst isRelated = relateExecute(polygon, polyline, "TTTFFTFFT");
execute
- Signature
-
execute (geometry1: GeometryUnion, geometry2: GeometryUnion, relation: string): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry1 | The first geometry for the relation. | | |
| geometry2 | The second geometry for the relation. | | |
| relation | The DE-9IM matrix relation encoded as a string to test against the relationship of the two geometries | |
- Returns
- boolean
Returns
trueif 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 stringconst isRelated = relateExecute(polygon, polyline, "TTTFFTFFT");
relateIsValidDE9IM
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if the DE-9IM matrix relation is valid.
- Signature
-
relateIsValidDE9IM (relation: string): boolean
isValidDE9IM
Indicates if the DE-9IM matrix relation is valid.
- Signature
-
isValidDE9IM (relation: string): boolean
Variables
relateSupportsCurves
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- ReturnType