@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
36 lines (33 loc) • 1.66 kB
TypeScript
/**
* Perform a relational operation to determine if one 2D geometry is within another 2D geometry. Geometry A is within geometry B, when A is the intersection of A and B.
*
* Geometry A can be non-simple geometry.
*
* 
*
* @since 4.31
*/
import type { GeometryUnion } from "../types.js";
/**
* Accelerate a geometry. This method prepares the geometry for faster within 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;
/**
* Perform a within operation on two geometries.
*
* @param inner - The base geometry that is tested for the "within" relationship with `outer`.
* @param outer - The comparison geometry that is tested for the "contains" relationship with `inner`.
* @returns Returns `true` if `inner` is within `outer`.
* @example
* Returns true if a geometry is completely within another
* const isWithin = withinOperator.execute(polygon1, polygon2);
*/
export function execute(inner: GeometryUnion, outer: GeometryUnion): boolean;
/**
* Indicates if the operator supports input geometries that contain curves.
* The value will always be `true`.
*/
export const supportsCurves: boolean;