Introduction to geometry operators

The ArcGIS Maps SDK for JavaScript provides a variety of capabilities for performing client-side geometric operations on points, multipoints, lines, polygons and extents.

Categories

The geometry operators are grouped into eight functional categories: bounding, densify and generalize, feature to point, linear referencing, measurements, spatial relationships, topological operations, and transformations.

Bounding

Bounding operators are used to determine an enclosing shape around a more complex geometric object. This is used to quickly test for potential collisions or overlaps with other objects without needing to check every detail of the original geometry. The result geometry can be used to significantly improve the performance of spatial analysis.

alphaShapeOperator, boundaryOperator, convexHullOperator, minimumBoundingCircleOperator

Densify and generalize

Densifying a multipart geometry adds more vertices at regular intervals. Generalizing a multipart geometry simplifies it by removing vertices while preserving its general shape.

densifyOperator, generalizeOperator, geodeticDensifyOperator

Feature to point

Feature to point operations are used to locate a specific interior point in a polygon or extent.

centroidOperator, labelPointOperator

Linear referencing

Linear referencing is a method for determining geographic locations as relative positions between or along a measured line feature.

locateBetweenOperator

Measurements

Measurement operations are for determining the dimensions of geometric shapes.

areaOperator, distanceOperator, geodeticAreaOperator, geodeticDistanceOperator, geodeticLengthOperator, lengthOperator

Spatial relationships

Spatial relationships are about understanding where geometries are in relation to each other to define their arrangement and interactions.

containsOperator, crossesOperator, disjointOperator, equalsOperator, geodesicProximityOperator, intersectsOperator, intersectionOperator, isNearOperator, overlapsOperator, proximityOperator, relateOperator, touchesOperator, and withinOperator

Topological

Topological operations are about changing the shape of an object while maintaining its fundamental structure in terms of how parts are connected to each other. The result is the creation of a new geometry.

autoCompleteOperator, bufferOperator, clipOperator, cutOperator, differenceOperator, geodesicBufferOperator, graphicBufferOperator, extendOperator, integrateOperator, multiPartToSinglePartOperator, offsetOperator, polygonOverlayOperator, reshapeOperator, linesToPolygonsOperator, polygonSlicerOperator, simplifyOperator, symmetricDifferenceOperator, unionOperator

Transformations

Transformations can be applied to geometries using the affineTransformOperator. The operations involve the process of altering the spatial location, shape, or orientation of geographic data by manipulating the coordinates and include flipX, flipY, scale and more.

Working with spatial relationship operators

Dimensionality

The concept of dimensions is important in determining the spatial relationship of two features. The dimensions of the features are examined to determine how they should be compared. The dimension of the resulting feature or features determines whether or not the operation was successful.

The dimensions of a geometry are the minimum coordinates (none, x, y) required to define the spatial extent of the geometry. A geometry can have a dimension of 0, 1, or 2. The dimensions are as follows:

  • 0 — Has neither length nor area
  • 1 — Has a length (x or y)
  • 2 — Contains area (x and y)

Point and multipoint features have a dimension of 0, polylines a dimension of 1, and extents and polygons a dimension of 2. The presence of z-coordinates or m-coordinates does not affect the dimensionality of the geometry.

Acceleration

Relational operators can benefit from acceleration. Acceleration is the process of constructing data structures used during relational operations, such as a spatial index, and saving them to be reused. This process can have performance benefits when applying the same relational operation against a geometry numerous times.

Accelerating a geometry can be time consuming and should be weighed when determining when to use it. The time to accelerate versus the performance gain depends on the number of vertices in the geometry. If the geometry has a large number of vertices, for example more than 10,000, then you can see a performance gain from acceleration even if you are using it only ten times. If the geometry has a small number of vertices, for example less than 200, you may not see a performance gain from acceleration unless you are using it more than 100 to 200 times.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.