import { simplifyOGCExecute, execute, simplifyOGCExecuteMany, executeMany, simplifyOGCIsSimple } from "@arcgis/core/geometry/operators/simplifyOGCOperator.js";
Since
ArcGIS Maps SDK for JavaScript 4.33

Simplifies geometries according to the OGC Simple Feature Access specification 1.2.1.

NOTE: OGC simplicity does NOT guarantee Esri simplicity. Use the simplifyOperator when Esri simplification of geometries is required.

Simplify OGC operator

Functions

simplifyOGCExecute

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Performs OGC simplification on a single geometry.

Signature
simplifyOGCExecute (geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometry

The geometry to simplify.

Returns
GeometryWithoutMeshUnion | null | undefined

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.

Example
// Simplify using OGC rules
const simplified = simplifyOGCExecute(polyline);
console.log(simplifyOGCIsSimple(simplified)); // true

execute

deprecated Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Performs OGC simplification on a single geometry.

Signature
execute (geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometry

The geometry to simplify.

Returns
GeometryWithoutMeshUnion | null | undefined

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.

Example
// Simplify using OGC rules
const simplified = simplifyOGCExecute(polyline);
console.log(simplifyOGCIsSimple(simplified)); // true

simplifyOGCExecuteMany

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Performs OGC simplification on a collection of geometries.

Signature
simplifyOGCExecuteMany (geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[]

Parameters

ParameterTypeDescriptionRequired
geometries

The geometries to simplify. All geometries must have the same spatial reference.

Returns
(GeometryWithoutMeshUnion | null | undefined)[]

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.

executeMany

deprecated Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Performs OGC simplification on a collection of geometries.

Signature
executeMany (geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[]

Parameters

ParameterTypeDescriptionRequired
geometries

The geometries to simplify. All geometries must have the same spatial reference.

Returns
(GeometryWithoutMeshUnion | null | undefined)[]

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.

simplifyOGCIsSimple

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Checks whether the given geometry is OGC topologically simple. This operation takes into account z-values.

Point geometries are always simple.

Multipoint geometries cannot contain points with equal x- and y-coordinates. The tolerance is taken into account.

Within a 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 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.

Signature
simplifyOGCIsSimple (geometry: GeometryUnion): boolean

Parameters

ParameterTypeDescriptionRequired
geometry

The input geometry.

Returns
boolean

Returns whether the geometry is simple.

Example
// Checks whether the geometry is OGC simple
const simple = simplifyOGCIsSimple(polyline);
console.log(simple); // true | false

isSimple

deprecated Function

Checks whether the given geometry is OGC topologically simple. This operation takes into account z-values.

Point geometries are always simple.

Multipoint geometries cannot contain points with equal x- and y-coordinates. The tolerance is taken into account.

Within a 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 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.

Signature
isSimple (geometry: GeometryUnion): boolean

Parameters

ParameterTypeDescriptionRequired
geometry

The input geometry.

Returns
boolean

Returns whether the geometry is simple.

Example
// Check whether the geometry is OGC simple
const simple = simplifyOGCIsSimple(polyline);
console.log(simple); // true | false

Variables

simplifyOGCSupportsCurves

Variable
Since
ArcGIS Maps SDK for JavaScript 5.2

Indicates if the operator supports input geometries that contain curves. The value will always be true.

Type
boolean

supportsCurves

deprecated Variable

Indicates if the operator supports input geometries that contain curves. The value will always be true.

Type
ReturnType