import { execute, executeMany, isSimple, supportsCurves } from "@arcgis/core/geometry/operators/simplifyOGCOperator.js";const { execute, executeMany, isSimple, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/simplifyOGCOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.33
Simplifies geometries to enforce topological correctness according to the OGC Simple Feature Access specification 1.2.1. This operator uses stricter rules than simplifyOperator.

Functions
execute
Performs the OGC simplify operation on a single geometry.
- Signature
-
execute (geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The geometry to be simplified. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the simplified geometry, or null. Geometry's with non-finite x or y, or infinite Zs return null. The method will set NaN z values to 0.
Example
// Topologically simplifies a geometryconst simplified = simplifyOGCOperator.execute(polyline);console.log(simplifyOGCOperator.isSimple(simplified)); // true executeMany
Performs the OGC simplify operation on the geometry set.
- Signature
-
executeMany (geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The array of geometries to be simplified, All the geometries must have the same spatial reference. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns the simplified geometry, or null. Geometry's with non-finite x or y, or infinite Zs return null. The method will set NaN z values to 0.
isSimple
Indicates if the given geometry is OGC topologically simple. This operation takes into account z-values.
Point geometries are always simple.
Multipoint geometries cannot have any points with exactly equal x and y. The tolerance is taken into account.
For a given Polyline path, there can be no intersections between segments with exception of the first and the last points of a path, which can coincide forming a closed path with no boundary points. Different paths can only intersect at the boundary points.
Polygon geometries are considered simple if the following is true:
- Rings cannot have self intersections, or self-tangency.
- Rings are sorted such that each exterior ring is followed by its immediate interior ring (holes). The exterior ring with the corresponding holes form the OGC polygon type.
- The interior has to be a connected set. Any two points in the interior can be connected by a path that contains only interior points.
- Exterior rings have to be oriented clockwise, holes are oriented counterclockwise.
All tests for equality or segment intersections use the tolerance and resolution. The operator uses 2 * sqrt(2) * tolerance when checking whether two points are equal, and sqrt(2) * tolerance when checking if a point lies on a segment. Both values are obtained from the geometry's spatial reference. If it is null, then a small tolerance value is calculated from the geometry coordinates using double-precision. Resolution is added to take into account possible rounding errors.
- Signature
-
isSimple (geometry: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | |
- Returns
- boolean
Returns true if the geometry is simple, otherwise returns false.
Example
// returns true if given geometry is OGC simpleconst simple = simplifyOGCOperator.isSimple(polyline);console.log(simple); // true | falseVariables
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean