UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

42 lines (38 loc) 1.94 kB
/** * 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. * * @since 4.31 */ import type { GeometryUnion } from "../types.js"; /** * 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](https://developers.arcgis.com/javascript/latest/spatial-analysis/intro-geometry-operators/#acceleration) guide topic for more information. * * @param geometry - The geometry to accelerate. * @returns Returns `true` if the geometry was successfully accelerated. */ export function accelerateGeometry(geometry: GeometryUnion): boolean; /** * @param geometry1 - The first geometry for the relation. * @param geometry2 - The second geometry for the relation. * @param relation - The DE-9IM matrix relation encoded as a string to test against the relationship of the two geometries * @returns 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"); */ export function execute(geometry1: GeometryUnion, geometry2: GeometryUnion, relation: string): boolean; /** * Indicates if the DE-9IM matrix relation is valid. * * @param relation - The DE-9IM matrix relation encoded as a string. * @returns Returns `true` if the DE-9IM matrix relation is valid. */ export function isValidDE9IM(relation: string): boolean; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. */ export const supportsCurves: boolean;