relateOperator

AMD: require(["esri/geometry/operators/relateOperator"], (relateOperator) => { /* code goes here */ });
ESM: import * as relateOperator from "@arcgis/core/geometry/operators/relateOperator.js";
Object: esri/geometry/operators/relateOperator
Since: ArcGIS Maps SDK for JavaScript 4.31
beta

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.

See, http://en.wikipedia.org/wiki/DE-9IM.

Method Overview

Name Return Type Summary Object

Accelerate a geometry.

relateOperator
relateOperator
relateOperator

Method Details

accelerateGeometry

Method
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).

Parameter
geometry Geometry

The geometry to accelerate.

Returns
Type Description
Boolean Returns true if the geometry was successfully accelerated.

execute

Method
execute(geometry1, geometry2, relation){Boolean}
Parameters
geometry1 Geometry

The first geometry for the relation.

geometry2 Geometry

The second geometry for the relation.

relation String

The DE-9IM matrix relation encoded as a string to test against the relationship of the two geometries

Returns
Type 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");

isValidDE9IM

Method
isValidDE9IM(relation)
Parameter
relation

The DE-9IM matrix relation encoded as a string.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close