/** * Simplifies geometries according to the [OGC Simple Feature Access specification 1.2.1](https://www.ogc.org/standards/sfa/). * * **NOTE:** OGC simplicity does NOT guarantee Esri simplicity. Use the [simplifyOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOperator/) when Esri simplification of geometries is required. * * ![Simplify OGC operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/isSimpleOGC.avif "Simplify OGC operator") * * @since 4.33 */ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js"; /** * Performs OGC simplification on a single geometry. * * @param geometry - The geometry to simplify. * @returns The simplified geometry, or `null` if the input contains non-finite x- or y-values, or infinite z-values. * NaN z-values are set to 0. * @since 5.2 * @example * // Simplify using OGC rules * const simplified = simplifyOGCExecute(polyline); * console.log(simplifyOGCIsSimple(simplified)); // true */ export function simplifyOGCExecute(geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined; /** * Performs OGC simplification on a single geometry. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [simplifyOGCExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOGCOperator/#simplifyOGCExecute). * @param geometry - The geometry to simplify. * @returns The simplified geometry, or `null` if the input contains non-finite x- or y-values, or infinite z-values. * NaN z-values are set to 0. * @since 5.2 * @example * // Simplify using OGC rules * const simplified = simplifyOGCExecute(polyline); * console.log(simplifyOGCIsSimple(simplified)); // true */ export function execute(geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined; /** * Performs OGC simplification on a collection of geometries. * * @param geometries - The geometries to simplify. All geometries must have the same spatial reference. * @returns An array of simplified geometries. Geometries with non-finite x- or y-values, or infinite z-values return `null`. * NaN z-values are set to 0. * The method will set NaN z values to 0. * @since 5.2 */ export function simplifyOGCExecuteMany(geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[]; /** * Performs OGC simplification on a collection of geometries. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [simplifyOGCExecuteMany()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOGCOperator/#simplifyOGCExecuteMany). * @param geometries - The geometries to simplify. All geometries must have the same spatial reference. * @returns An array of simplified geometries. Geometries with non-finite x- or y-values, or infinite z-values return `null`. * NaN z-values are set to 0. * @since 5.2 */ export function executeMany(geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[]; /** * Checks whether the given geometry is OGC topologically simple. This operation takes into account z-values. * * [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) geometries are always simple. * * [Multipoint](https://developers.arcgis.com/javascript/latest/references/core/geometry/Multipoint/) geometries cannot contain points with equal x- and y-coordinates. * The tolerance is taken into account. * * Within a [Polyline](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polyline/) path, segments cannot intersect except at coincident start and end points that form a closed path with no boundary points. * Different paths can intersect only at boundary points. * * [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) geometries are simple when: * * Rings do not self-intersect or self-touch. * * Each exterior ring is followed by its interior rings (holes). * * The polygon interior forms a connected set. * * Exterior rings are clockwise and interior rings (holes) are counterclockwise. * * Equality and segment-intersection tests use the spatial reference's tolerance and resolution. * The operator uses 2 * sqrt(2) * tolerance when comparing points and * sqrt(2) * tolerance when determining whether a point lies on a segment. * These values are obtained from the geometry's spatial reference. * If the spatial reference is null, a small tolerance is derived from the geometry coordinates using double precision. * Resolution is used to account for rounding errors. * * @param geometry - The input geometry. * @returns Returns whether the geometry is simple. * @since 5.2 * @example * // Checks whether the geometry is OGC simple * const simple = simplifyOGCIsSimple(polyline); * console.log(simple); // true | false */ export function simplifyOGCIsSimple(geometry: GeometryUnion): boolean; /** * Checks whether the given geometry is OGC topologically simple. This operation takes into account z-values. * * [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) geometries are always simple. * * [Multipoint](https://developers.arcgis.com/javascript/latest/references/core/geometry/Multipoint/) geometries cannot contain points with equal x- and y-coordinates. * The tolerance is taken into account. * * Within a [Polyline](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polyline/) path, segments cannot intersect except at coincident start and end points that form a closed path with no boundary points. * Different paths can intersect only at boundary points. * * [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) geometries are simple when: * * Rings do not self-intersect or self-touch. * * Each exterior ring is followed by its interior rings (holes). * * The polygon interior forms a connected set. * * Exterior rings are clockwise and interior rings (holes) are counterclockwise. * * Equality and segment-intersection tests use the spatial reference's tolerance and resolution. * The operator uses 2 * sqrt(2) * tolerance when comparing points and * sqrt(2) * tolerance when determining whether a point lies on a segment. * These values are obtained from the geometry's spatial reference. * If the spatial reference is null, a small tolerance is derived from the geometry coordinates using double precision. * Resolution is used to account for rounding errors. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [simplifyOGCIsSimple()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOGCOperator/#simplifyOGCIsSimple). * @param geometry - The input geometry. * @returns Returns whether the geometry is simple. * @example * // Check whether the geometry is OGC simple * const simple = simplifyOGCIsSimple(polyline); * console.log(simple); // true | false */ export function isSimple(geometry: GeometryUnion): boolean; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @since 5.2 */ export const simplifyOGCSupportsCurves: boolean; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `true`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [simplifyOGCSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOGCOperator/#simplifyOGCSupportsCurves). */ export const supportsCurves: ReturnType;