# GeometryEngine Class

Performs geometric operations such as spatial relationship tests, reprojections, shape manipulations, topological query and analysis operations on Geometry objects. More...

Header: | #include <GeometryEngine.h> |

Since: | Esri::ArcGISRuntime 100.0 |

Inherits: | Esri::ArcGISRuntime::Object |

This class was introduced in Esri::ArcGISRuntime 100.0.

## Public Functions

virtual | ~GeometryEngine() override |

## Static Public Members

double | area(const Esri::ArcGISRuntime::Geometry &geometry) |

double | areaGeodetic(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::AreaUnit &unit, Esri::ArcGISRuntime::GeodeticCurveType curveType) |

QList<Esri::ArcGISRuntime::Polygon> | autoComplete(const QList<Esri::ArcGISRuntime::Geometry> &existingBoundaries, const QList<Esri::ArcGISRuntime::Geometry> &newBoundaries) |

Esri::ArcGISRuntime::Geometry | boundary(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Polygon | buffer(const Esri::ArcGISRuntime::Geometry &geometry, double distance) |

QList<Esri::ArcGISRuntime::Polygon> | buffer(const QList<Esri::ArcGISRuntime::Geometry> &geometries, const QList<double> &distances, bool unionResult) |

Esri::ArcGISRuntime::Polygon | bufferGeodetic(const Esri::ArcGISRuntime::Geometry &geometry, double distance, const Esri::ArcGISRuntime::LinearUnit &unit, double maxDeviation, Esri::ArcGISRuntime::GeodeticCurveType curveType) |

QList<Esri::ArcGISRuntime::Polygon> | bufferGeodetic(const QList<Esri::ArcGISRuntime::Geometry> &geometries, const QList<double> &distances, const Esri::ArcGISRuntime::LinearUnit &unit, double maxDeviation, Esri::ArcGISRuntime::GeodeticCurveType curveType, bool unionResult) |

Esri::ArcGISRuntime::Geometry | clip(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::Envelope &envelope) |

Esri::ArcGISRuntime::Envelope | combineExtents(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::Envelope | combineExtents(const QList<Esri::ArcGISRuntime::Geometry> &geometries) |

bool | contains(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::Geometry | convexHull(const Esri::ArcGISRuntime::Geometry &geometry) |

QList<Esri::ArcGISRuntime::Geometry> | convexHull(const QList<Esri::ArcGISRuntime::Geometry> &geometries, bool unionResult) |

Esri::ArcGISRuntime::Point | createPointAlong(const Esri::ArcGISRuntime::Polyline &polyline, double distance) |

bool | crosses(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

QList<Esri::ArcGISRuntime::Geometry> | cut(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::Polyline &cutter) |

Esri::ArcGISRuntime::Geometry | densify(const Esri::ArcGISRuntime::Geometry &geometry, double maxSegmentLength) |

Esri::ArcGISRuntime::Geometry | densifyGeodetic(const Esri::ArcGISRuntime::Geometry &geometry, double maxSegmentLength, const Esri::ArcGISRuntime::LinearUnit &lengthUnit, Esri::ArcGISRuntime::GeodeticCurveType curveType) |

Esri::ArcGISRuntime::Geometry | difference(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

bool | disjoint(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

double | distance(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::GeodeticDistanceResult | distanceGeodetic(const Esri::ArcGISRuntime::Point &point1, const Esri::ArcGISRuntime::Point &point2, const Esri::ArcGISRuntime::LinearUnit &distanceUnit, const Esri::ArcGISRuntime::AngularUnit &azimuthUnit, Esri::ArcGISRuntime::GeodeticCurveType curveType) |

Esri::ArcGISRuntime::Geometry | ellipseGeodesic(const Esri::ArcGISRuntime::GeodesicEllipseParameters ¶meters) |

bool | equals(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::Polyline | extend(const Esri::ArcGISRuntime::Polyline &polyline, const Esri::ArcGISRuntime::Polyline &extender, Esri::ArcGISRuntime::GeometryExtendOptions extendOptions) |

double | fractionAlong(const Esri::ArcGISRuntime::Polyline &line, const Esri::ArcGISRuntime::Point &point, double tolerance) |

Esri::ArcGISRuntime::Geometry | generalize(const Esri::ArcGISRuntime::Geometry &geometry, double maxDeviation, bool removeDegenerateParts) |

Esri::ArcGISRuntime::GeometryEngine * | instance() |

Esri::ArcGISRuntime::Geometry | intersection(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

QList<Esri::ArcGISRuntime::Geometry> | intersections(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

bool | intersects(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

bool | isSimple(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Point | labelPoint(const Esri::ArcGISRuntime::Polygon &polygon) |

double | length(const Esri::ArcGISRuntime::Geometry &geometry) |

double | lengthGeodetic(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::LinearUnit &lengthUnit, Esri::ArcGISRuntime::GeodeticCurveType curveType) |

QList<Esri::ArcGISRuntime::Point> | moveGeodetic(const QList<Esri::ArcGISRuntime::Point> &pointCollection, double distance, const Esri::ArcGISRuntime::LinearUnit &distanceUnit, double azimuth, const Esri::ArcGISRuntime::AngularUnit &azimuthUnit, Esri::ArcGISRuntime::GeodeticCurveType curveType) |

Esri::ArcGISRuntime::ProximityResult | nearestCoordinate(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::Point &point) |

Esri::ArcGISRuntime::ProximityResult | nearestCoordinateGeodetic(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::Point &point, double maxDeviation, const Esri::ArcGISRuntime::LinearUnit &deviationUnit) |

Esri::ArcGISRuntime::ProximityResult | nearestVertex(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::Point &point) |

Esri::ArcGISRuntime::Geometry | normalizeCentralMeridian(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Geometry | offset(const Esri::ArcGISRuntime::Geometry &geometry, double distance, Esri::ArcGISRuntime::GeometryOffsetType offsetType, double bevelRatio, double flattenError) |

bool | overlaps(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::Geometry | project(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::SpatialReference &spatialReference) |

Esri::ArcGISRuntime::Geometry | project(const Esri::ArcGISRuntime::Geometry &geometry, const Esri::ArcGISRuntime::SpatialReference &spatialReference, Esri::ArcGISRuntime::DatumTransformation *datumTransformation) |

bool | relate(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2, const QString &relation) |

Esri::ArcGISRuntime::Geometry | removeM(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Geometry | removeZ(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Geometry | removeZAndM(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Multipart | reshape(const Esri::ArcGISRuntime::Multipart &geometry, const Esri::ArcGISRuntime::Polyline &reshaper) |

Esri::ArcGISRuntime::Geometry | sectorGeodesic(const Esri::ArcGISRuntime::GeodesicSectorParameters ¶meters) |

Esri::ArcGISRuntime::Geometry | setM(const Esri::ArcGISRuntime::Geometry &geometry, double m) |

Esri::ArcGISRuntime::Geometry | setZ(const Esri::ArcGISRuntime::Geometry &geometry, double z) |

Esri::ArcGISRuntime::Geometry | setZAndM(const Esri::ArcGISRuntime::Geometry &geometry, double z, double m) |

Esri::ArcGISRuntime::Geometry | simplify(const Esri::ArcGISRuntime::Geometry &geometry) |

Esri::ArcGISRuntime::Geometry | symmetricDifference(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

bool | touches(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::Geometry | unionOf(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

Esri::ArcGISRuntime::Geometry | unionOf(const QList<Esri::ArcGISRuntime::Geometry> &geometries) |

bool | within(const Esri::ArcGISRuntime::Geometry &geometry1, const Esri::ArcGISRuntime::Geometry &geometry2) |

## Detailed Description

Capabilities include:

- Create new geometries from others with buffer(Geometry, double), clip(Geometry, Envelope) and union(Geometry, Geometry)
- Test spatial relationships between geometries such as intersects(Geometry, Geometry) and contains(Geometry, Geometry)
- Find the nearestCoordinate(Geometry, Point) or nearestVertex(Geometry, Point) between geometries
- Reproject a geometry to another SpatialReference using project(Geometry, SpatialReference)
- Calculate area and length using area(Geometry) and length(Geometry), or the geodetic equivalents (bufferGeodetic(Geometry, double, LinearUnit, double, GeodeticCurveType) and lengthGeodetic(Geometry, LinearUnit, GeodeticCurveType)) that account for the curvature of the earth

GeometryEngine generally operates in two dimensions; operations do not account for z-values unless documented as such for a specific method (for example project(Geometry, SpatialReference) transforms z-values in some cases).

Geodetic methods are better suited to data that have a geographic spatial reference (see SpatialReference::isGeographic), especially for large-area, small-scale use, while planar methods are suitable to data that have a projected coordinate system, especially for local, large-scale areas. Geodetic methods indicate this in the name, for example bufferGeodetic(Geometry, double, LinearUnit, double, GeodeticCurveType).

## Member Function Documentation

`[override virtual] `

GeometryEngine::~GeometryEngine()

Destructor.

`[static] `

double GeometryEngine::area(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns the area for the given geometry.

*geometry*- The input geometry.

Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results, consider using a different spatial reference, or using the geodetic equivalent, GeometryEngine::areaGeodetic(). See Introduction to Spatial References for more information.

Supports true curves.

`[static] `

double GeometryEngine::areaGeodetic(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::AreaUnit &*unit*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*)

Returns the geodetic area of the input geometry.

*geometry*- The input geometry.*unit*- The unit of measurement for the output value. If null, then meters squared are assumed.*curveType*- The GeodeticCurveType to use.

This method returns `-1.0`

when the input geometry is empty.

`[static] `

QList<Esri::ArcGISRuntime::Polygon> GeometryEngine::autoComplete(const QList<Esri::ArcGISRuntime::Geometry> &*existingBoundaries*, const QList<Esri::ArcGISRuntime::Geometry> &*newBoundaries*)

Fills the closed gaps between polygons using polygon boundaries and polylines as the boundary for the new polygons.

*existingBoundaries*- The polygons.*newBoundaries*- The polylines.

The new polygons are created in the closed empty areas bounded by the edges of the existing polygon boundaries and the new boundary polylines. The newly created polygons do not overlap any existing polygons or polylines, and the boundary of a new polygon must contain at least one edge from the polylines. Only polygons that intersect the input polylines participate in the operation, so it makes sense to prefilter the input accordingly.

The geometries in existingBoundaries must all have an area, i.e., be polygons or envelopes. The geometries in newBoundaries must all be polylines. The geometries in existingBoundaries and newBoundaries must have consistent spatial references.

Use of a true curve geometry as input is not supported by this method and will emit the `errorOccurred`

signal with ErrorType::CommonNotImplemented.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::boundary(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns the boundary portion of a *geometry*.

Returns a geometry representing the boundary of the input geometry. Supports true curves.

- The boundary of a point is an empty geometry. Points have no boundary.
- The boundary of a polygon is a polyline describing its outer and inner rings.
- The boundary of a polyline are its end points.

`[static] `

Esri::ArcGISRuntime::Polygon GeometryEngine::buffer(const Esri::ArcGISRuntime::Geometry &*geometry*, double *distance*)

Returns a polygon object that represents a buffer at the desired distance relative to the given geometry.

Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results, consider using a different spatial reference, or using the geodetic equivalent, GeometryEngine::bufferGeodetic(). See Introduction to Spatial References for more information.

*geometry*- The input geometry.*distance*- The distance to buffer the input geometry.

Calculates the buffer with simple 2D distances. The distance is expressed in the same unit of measurement as the spatial reference of *geometry*.

Supports true curves as input, producing a densified curve as output where applicable.

`[static] `

QList<Esri::ArcGISRuntime::Polygon> GeometryEngine::buffer(const QList<Esri::ArcGISRuntime::Geometry> &*geometries*, const QList<double> &*distances*, bool *unionResult*)

Creates and returns a collection of polygons representing buffers at the defined distance(s) relative to the input geometries.

The geometries must have the same spatial reference. Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results, consider using a different spatial reference, or using the geodetic equivalent, GeometryEngine::bufferGeodetic(). See Introduction to Spatial References for more information.

If unionResult is `true`

, the output collection contains a single result. Supports true curves as input, producing a densified curve as output where applicable. If geometries is empty, an empty list is returned. Returns an empty list on error.

*geometries*- A list of geometries to buffer.*distances*- The distance to buffer each geometry, expressed as a list of double values. If the size of the distances list is less than the number of geometries, the last distance value is used for the rest of geometries.*unionResult*- Whether to union the resulting geometries. If`true`

, a single polygon that buffers all the geometries is returned, else one buffer polygon for each in the given collection is returned.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Polygon GeometryEngine::bufferGeodetic(const Esri::ArcGISRuntime::Geometry &*geometry*, double *distance*, const Esri::ArcGISRuntime::LinearUnit &*unit*, double *maxDeviation*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*)

Returns a geodetic buffer polygon of a given geometry.

*geometry*- The input geometry.*distance*- The distance to buffer the input geometry.*unit*- The unit of measurement for the input distance.*maxDeviation*- The maximum deviation between points.*curveType*- The GeodeticCurveType to use.

Geodesic buffers account for the actual shape of the Earth. Distances are calculated between points on a curved surface (the geoid) as opposed to points on a flat surface (the Cartesian plane). Negative distance can be used to create a buffer inside a Polygon or an Envelope. Using a negative buffer distance shrinks geometry's boundary by the distance specified. Note that if the negative buffer distance is large enough, the geometry may collapse to an empty polygon.

Using a true curve geometry as input is not supported by this method and emits the `errorOccurred`

signal with ErrorType::CommonNotImplemented.

`[static] `

QList<Esri::ArcGISRuntime::Polygon> GeometryEngine::bufferGeodetic(const QList<Esri::ArcGISRuntime::Geometry> &*geometries*, const QList<double> &*distances*, const Esri::ArcGISRuntime::LinearUnit &*unit*, double *maxDeviation*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*, bool *unionResult*)

Buffers all geometries in the list by the corresponding geodetic distance.

Returns a collection of polygon geometries that represent a geodesic buffer at the desired distance(s) relative to the given geometries. If *unionResult* is `true`

, the resulting collection contains a single polygon. If geometries is empty, returns an empty array. Returns null on error.

*geometries*- A list of geometries to buffer.*distances*- The distance to buffer each geometry, expressed as a list of double values. If the size of the distances list is less than the number of geometries, the last distance value is used for the rest of geometries.*unit*- The unit of measurement for the input distance.*maxDeviation*- The maximum deviation between points.*curveType*- The GeodeticCurveType to use.*unionResult*- Whether to union the resulting geometries. If`true`

, a single polygon that buffers all the geometries is returned, else one buffer polygon for each in the given collection is returned.

Geodesic buffers account for the actual shape of the Earth. Distances are calculated between points on a curved surface (the geoid) as opposed to points on a flat surface (the Cartesian plane). Negative distance can be used to create buffers inside polygons. Using a negative buffer distance shrinks a polygon's boundaries by the distance specified. Note that if the negative buffer distance is large enough, a polygon may collapse to empty geometries.

Use of a true curve geometry as input is not supported by this method and will emit the `errorOccurred`

signal with ErrorType::CommonNotImplemented.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::clip(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::Envelope &*envelope*)

Returns the portion of a *geometry* that intersects an *envelope*.

Supports true curves.

`[static] `

Esri::ArcGISRuntime::Envelope GeometryEngine::combineExtents(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns an Envelope representing the minimum extent that encloses both *geometry1* and *geometry2*.

The given geometries must be of the same spatial references.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Envelope GeometryEngine::combineExtents(const QList<Esri::ArcGISRuntime::Geometry> &*geometries*)

Returns an Envelope representing the minimum extent that encloses all *geometries* in the list.

The given geometries must be of the same spatial references.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

bool GeometryEngine::contains(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* contains *geometry2*.

Geometry1 contains geometry2 if geometry2 lies completely within geometry1. Supports true curves.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::convexHull(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns the convex hull of a *geometry*.

A convex hull is a geometry whose vertices are the smallest set of vertices needed to surround the input geometry. One way to visualize this is as a rubber band stretched around a polygon that has some concave sides.

Use of a true curve geometry as input is not supported by this method and will emit the `errorOccurred`

signal with ErrorType::CommonNotImplemented.

`[static] `

QList<Esri::ArcGISRuntime::Geometry> GeometryEngine::convexHull(const QList<Esri::ArcGISRuntime::Geometry> &*geometries*, bool *unionResult*)

Returns the convex hull of each of the *geometries* in the list.

If *unionResult* is `true`

a single geometry that encloses all the geometries is returned, otherwise one enclosing geometry for each in the given collection is returned.

A convex hull is a geometry whose vertices are the smallest set of vertices needed to surround the input geometry. One way to visualize this is as a rubber band stretched around a polygon that has some concave sides.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Point GeometryEngine::createPointAlong(const Esri::ArcGISRuntime::Polyline &*polyline*, double *distance*)

Returns the point at the given distance along the line.

If distance is less than or equal to zero, the point returned is coincident with the start of the line. If distance is greater than or equal to the line's length, the point returned is coincident with the end of the line. If the line has multiple parts, and the distance falls exactly on a boundary between two parts, the returned point is coincident with either the end of one part or the start of the next, which is indeterminate.

*polyline*- The polyline from which point is created.*distance*- The distance along the line of the point to return, in the line's units.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.2.

`[static] `

bool GeometryEngine::crosses(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* and *geometry2* cross.

Geometries cross when they have some but not all of their interiors in common, and when the geometry representing their intersection has a dimension that is less that at least one of the input geometries.

An example of this is when a polyline's interior (the portion between the end points) intersects a polygon's interior (the part within the boundary ring) but some part of the polyline's interior is outside the polygon. Therefore, some of the interior of the polyline is not in common with the polygon's interior, and the intersection geometry is a polyline with a dimension 1. A polygon's dimension is 2.

Supports true curves.

`[static] `

QList<Esri::ArcGISRuntime::Geometry> GeometryEngine::cut(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::Polyline &*cutter*)

Returns a list of cut geometries.

*geometry*- The input geometry to be cut.*cutter*- The polyline used to divide the geometry into pieces where they cross the cutter.

The cutter and geometry's spatial references must match. If there were no cuts, an empty list is returned.

`errorOccurred`

signal with ErrorType::CommonNotImplemented.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::densify(const Esri::ArcGISRuntime::Geometry &*geometry*, double *maxSegmentLength*)

Densifies the input geometry by inserting additional vertices along the geometry at an interval defined by maxSegmentLength.

*geometry*- An {Esri::ArcGISRuntime::Envelope} {Envelope}, Polyline or Polygon geometry.*maxSegmentLength*- The maximum distance between vertices when the input geometry is densified, in the given linear units. The linear unit is assumed to be that of the input geometry's spatial reference (decimal degrees for a geometry with a geographic spatial reference, meters for geometry with a Mercator spatial reference, and so on). Use SpatialReference::unit to determine the unit used by a specific spatial reference.

Additional vertices are not inserted on segments of the input {Esri::ArcGISRuntime::Envelope} {Envelope}, Polygon, or Polyline that are shorter than maxSegmentLength.

Supports true curves as input, producing a densified curve as output where applicable.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::densifyGeodetic(const Esri::ArcGISRuntime::Geometry &*geometry*, double *maxSegmentLength*, const Esri::ArcGISRuntime::LinearUnit &*lengthUnit*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*)

Densifies the input geometry by creating additional vertices along the geometry, using a geodesic curve.

*geometry*- The input geometry.*maxSegmentLength*- The maximum distance between vertices when the input geometry is densified.*lengthUnit*- The unit of measurement for maxSegmentLength. If null, meters are assumed.*curveType*- The GeodeticCurveType to use.

`errorOccurred`

signal with ErrorType::CommonNotImplemented.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::difference(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns the geometric difference of *geometry1* and *geometry2*.

The output geometry is the part of *geometry1* that does not intersect geometry2. The dimension of *geometry2* must be equal to or greater than the dimension of *geometry1*.

Supports true curves.

`[static] `

bool GeometryEngine::disjoint(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* and *geometry2* are disjoint.

Geometries are disjoint if their boundaries, interiors, or any combination thereof do not intersect. Supports true curves.

`[static] `

double GeometryEngine::distance(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Measures the simple planar distance between two geometries.

Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results, consider using a different spatial reference, or using the geodetic equivalent, GeometryEngine::distanceGeodetic().

*geometry1*- The first geometry for this measurement.*geometry2*- The second geometry for this measurement.

See Introduction to Spatial References for more information.

Supports true curves, calculating the result by densifying curves.

`[static] `

Esri::ArcGISRuntime::GeodeticDistanceResult GeometryEngine::distanceGeodetic(const Esri::ArcGISRuntime::Point &*point1*, const Esri::ArcGISRuntime::Point &*point2*, const Esri::ArcGISRuntime::LinearUnit &*distanceUnit*, const Esri::ArcGISRuntime::AngularUnit &*azimuthUnit*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*)

Returns the geodetic distance between two points, and the azimuths from one to another.

*point1*A point object.*point2*Another point object*distanceUnit*- The LinearUnit of measurement for the returned results. Assumes meters if no unit is given.*azimuthUnit*- The AngularUnit of measurement for the returned results. Assumes degrees if no unit is given.*curveType*- The GeodeticCurveType to use.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::ellipseGeodesic(const Esri::ArcGISRuntime::GeodesicEllipseParameters &*parameters*)

Returns a geodesic ellipse centered on a specific point.

*parameters*- The GeodesicEllipseParameters to use.

This method can return an ellipse as a Polygon, Polyline, or Multipoint geometry.

A geodesic ellipse is defined by a center point, the lengths of its semi-major and semi-minor axes, and the angular direction of its semi-major axis.

This method returns an empty geometry when:

`parameters`

is empty.`parameters.center`

is empty.`parameters.center`

does not contain a valid spatial reference`parameters.geometryType`

is Envelope or Point.- Either semi-axis length is less than zero.

**See also **GeodesicEllipseParameters.

`[static] `

bool GeometryEngine::equals(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* and *geometry2* are equal.

The geometries are equal if they have the same spatial reference systems, geometry type and points. Supports true curves.

`[static] `

Esri::ArcGISRuntime::Polyline GeometryEngine::extend(const Esri::ArcGISRuntime::Polyline &*polyline*, const Esri::ArcGISRuntime::Polyline &*extender*, Esri::ArcGISRuntime::GeometryExtendOptions *extendOptions*)

Returns a polyline which is a result of extending a *polyline* with an *extender* using the type of extension specified with *extendOptions* flags.

The output polyline has the first and last segment of each path extended to the *extender* if the segments can be interpolated to intersect the *extender*. In the case that the segments can be extended to multiple segments of the extender, the shortest extension is chosen. Only end points for paths that are not shared by the end points of other paths are extended. If the *polyline* cannot be extended by the input *extender*, then a empty polyline is returned.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

double GeometryEngine::fractionAlong(const Esri::ArcGISRuntime::Polyline &*line*, const Esri::ArcGISRuntime::Point &*point*, double *tolerance*)

Returns the length along the line nearest the input point, expressed as the fraction of the line's length between 0.0 and 1.0, or NAN if the point is outside the tolerance.

Finds the location on the line nearest the input point, expressed as the fraction along the line's total geodesic length, if the point is within the specified distance from the closest location on the line. The line and point must have the same spatial references.

*line*- The line to locate the point's distance along its length.*point*- The point to locate.*tolerance*- The maximum distance that a point is allowed to be from the line, in the units of the SpatialReference. If the tolerance is -1, the fraction of the closest location on the line is always returned as long as the point lies between the two ends of the polyline. If the distance from the point to the closest location on the line is greater than the tolerance, or the tolerance is -1 and the point does not lie between the two ends of the polyline, NAN is returned.

This function was introduced in Esri::ArcGISRuntime 100.6.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::generalize(const Esri::ArcGISRuntime::Geometry &*geometry*, double *maxDeviation*, bool *removeDegenerateParts*)

Returns a geometry generalized by removing some vertices.

The Douglas-Peucker algorithm {with enhancements) is used to generalize the geometry. The algorithm simplifies complex lines by reducing the number of points used to represent them. Supports true curves as input, producing a densified curve as output where applicable.

*geometry*- The input geometry.*maxDeviation*- The maximum distance that the generalized geometry can deviate from the original one, specified in the units of the input geometry's spatial reference.*removeDegenerateParts*- Whether degenerate parts of the generalized geometry that are undesired for drawing are removed.

`[static] `

Esri::ArcGISRuntime::GeometryEngine *GeometryEngine::instance()

Returns an instance of the GeometryEngine singleton.

The instance is used to connect to the Object::errorOccurred signal. You do not need to obtain the instance to call the static methods on the GeometryEngine.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::intersection(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns a geometry representing the intersection of *geometry1* and *geometry2*.

`[static] `

QList<Esri::ArcGISRuntime::Geometry> GeometryEngine::intersections(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns a list of geometry objects that represent the intersection of *geometry1* and *geometry2*.

The returned list contains one geometry of each dimension for which there are intersections. For example, if both inputs are polylines, the collection contains at most two geometries: the first a multipoint containing the points at which the lines cross, and the second a polyline containing the lines of overlap. If a crossing point lies within a line of overlap, only the line of overlap is present -- the result set is not self- intersecting. If there are no crossing points or there are no lines of overlap, the respective geometry is not present in the returned list.

If the input geometries do not intersect, the resulting list is empty. Supports true curves.

The grid below shows, for each combination of pairs of input geometry types, the types of geometry that is contained within the returned list if there are intersections of that type.

Input type | Point/Multipoint | Polyline | Polygon/Envelope |
---|---|---|---|

Point/Multipoint | Multipoint | Multipoint | Multipoint |

Polyline | Multipoint | Multipoint, Polyline | Multipoint, Polyline |

Polygon/Envelope | Multipoint | Multipoint, Polyline | Multipoint, Polyline, Polygon |

The geometries in the returned list are sorted by ascending dimensionality, e.g. multipoint (dimension 0) then polyline (dimension 1) then polygon (dimension 2) for the intersection of two geometries with area that have intersections of those types.

`[static] `

bool GeometryEngine::intersects(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* intersects *geometry2*.

Supports true curves.

`[static] `

bool GeometryEngine::isSimple(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns a value indicating whether or not the geometry is simple.

*geometry*- The geometry object.

Point geometry is always simple.

For Multi_point: there can be no point with exactly equal x and y - the tolerance is not taken into account.

For Polylines: the only condition is there can be no degenerate segments. When the polyline has no z, the degenerate segments are those that have length in xy plane less or equal the tolerance. When the polyline has Z, the degenerate segments are those that are shorter than the tolerance in xy plane, and the change in z-value along the segment is less than or equal to the z-value tolerance.

For Polygons:

- Exterior rings are clockwise, and holes are counterclockwise
- Rings can touch other rings in finite number of points
- Rings can be self tangent in finite number of points
- Vertices are either exactly coincident, or further than the spatial reference tolerance from each other
- If a vertex is not equal to any boundary point of a segment, it has to be further than tolerance from any segment
- No segment length is zero or less than tolerance
- Each path contains at least three non-equal vertices
- No empty paths allowed
- Order of rings does not matter

Supports true curves.

`[static] `

Esri::ArcGISRuntime::Point GeometryEngine::labelPoint(const Esri::ArcGISRuntime::Polygon &*polygon*)

Calculates an interior point for the given *polygon*. This point can be used by clients to place a label for the polygon.

Supports true curves.

`[static] `

double GeometryEngine::length(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns the length of the given geometry.

*geometry*- The input geometry.

Returns the length using the same unit of measurement as the geometry's spatial reference.

Supports true curves.

`[static] `

double GeometryEngine::lengthGeodetic(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::LinearUnit &*lengthUnit*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*)

Returns the geodetic length of a geometry.

*geometry*- The input geometry.*lengthUnit*- The LinearUnit of measurement for the returned results.*curveType*- The GeodeticCurveType to use.

Supports true curves, calculating the result by densifying curves.

`[static] `

QList<Esri::ArcGISRuntime::Point> GeometryEngine::moveGeodetic(const QList<Esri::ArcGISRuntime::Point> &*pointCollection*, double *distance*, const Esri::ArcGISRuntime::LinearUnit &*distanceUnit*, double *azimuth*, const Esri::ArcGISRuntime::AngularUnit &*azimuthUnit*, Esri::ArcGISRuntime::GeodeticCurveType *curveType*)

Moves all points in the point collection in a specified direction by a geodetic distance.

*pointCollection*- A list of point objects.*distance*- The distance to move the points.*distanceUnit*- The LinearUnit of measurement for distance.*azimuth*- The azimuth angle of the direction for the points.*azimuthUnit*- The AngularUnit of measurement for azimuth. Degrees are assumed if no value is given.*curveType*- The GeodeticCurveType to use.

There must be the same spatial reference on each point in the input list of points. The returned collection is in the same order as the input, but with new points at their destination locations. Specifying a negative distance moves points in the opposite direction from azimuth.

`[static] `

Esri::ArcGISRuntime::ProximityResult GeometryEngine::nearestCoordinate(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::Point &*point*)

Returns a ProximityResult that describes the nearest *point* in the input *geometry* to the input point.

Input *geometry* of type Envelope is not supported. To find the nearest coordinate on an Envelope, convert it to a Polygon first.

GeometryEngine::nearestCoordinate considers all points along all segments of all parts of the geometry, whereas GeometryEngine::nearestVertex considers only points that are a start point or end point of a segment of the geometry.

If the specified geometry is a polyline or polygon, the nearest coordinate is the closest point in a segment that comprises geometry; it may not necessarily be the closest vertex of a segment. If you want to obtain the closest vertex in the polyline or polygon use the GeometryEngine::nearestVertex(Geometry, Point) method instead.

Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference. Ensure that you understand the potential for error with the geometry's spatial reference. If you need to calculate more accurate results consider using a different spatial reference, or using the geodetic equivalent, GeometryEngine::nearestCoordinateGeodetic.

Supports true curves.

`[static] `

Esri::ArcGISRuntime::ProximityResult GeometryEngine::nearestCoordinateGeodetic(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::Point &*point*, double *maxDeviation*, const Esri::ArcGISRuntime::LinearUnit &*deviationUnit*)

Returns a ProximityResult that describes the nearest point in the input geometry to the input point, by using a shape-preserving geodesic approximation of the input geometry.

Returns nullptr if the input geometry is empty. ProximityResult::distance is zero if the point lies inside an input polygon, polyline, or envelope.

Input *geometry* of type Envelope is not supported. To find the nearest coordinate on an Envelope, convert it to a Polygon first. Planar measurements of distance and area can be extremely inaccurate if using an unsuitable spatial reference.

Supports true curves.

*geometry*- A geometry object on which to calculate the nearest coordinate to the*point*parameter.*point*- The point from which to calculate the nearest coordinate on the*geometry*parameter.*maxDeviation*- The maximum distance that the geodesic geometry can deviate from the original, in the units of the*deviationUnit*parameter.*deviationUnit*- The unit of measure for the*maxDeviation*parameter. If you pass an empty LinearUnit, the units of*maxDeviation*are assumed to be meters.

This function was introduced in Esri::ArcGISRuntime 100.14.

`[static] `

Esri::ArcGISRuntime::ProximityResult GeometryEngine::nearestVertex(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::Point &*point*)

Returns a ProximityResult that describes the nearest vertex in the input *geometry* to the input *point*.

Input geometry of type Envelope is not supported. To find the nearest vertex on an Envelope, convert it to a Polygon first.

Input geometries with true curves (where Geometry::hasCurves is true) are supported, although curve segments do not affect the return value.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::normalizeCentralMeridian(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns a geometry folded into the 360-degree range of its associated spatial reference.

*geometry*- The input geometry to fold.

Folding is used when a geometry intersects the minimum or maximum meridian of the spatial reference, or when geometry is completely outside of the meridian range.

Use this method when editing geometries on a map that has wraparound enabled. In these cases, it is imperative to fold geometries, as the original coordinates correspond to the frame of the map. For example, if you add new features to a map with wraparound enabled, and then you pan west across the dateline several times, the coordinates of the newly added features would be incorrectly outside of the spatial reference's maximum extent until they were folded using this static method.

The geometry's spatial reference must be a pannable projected coordinate system (PCS) or a geographic coordinate system (GCS). A pannable PCS is a rectangular PCS where the x-coordinate range corresponds to a 360-degree range on the defining GCS. A GCS is always pannable.

Folding does not preserve geodetic area or length. Folding does not preserve the perimeter of a polygon.

Returns the folded geometry. The result geometry will be completely inside the coordinate system extent. If geometry or its spatial reference are empty, an empty geometry is returned. If the geometry's spatial reference is not pannable, the input geometry is returned. If the geometry is a non-empty envelope, this method returns a polygon.

Supports true curves.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::offset(const Esri::ArcGISRuntime::Geometry &*geometry*, double *distance*, Esri::ArcGISRuntime::GeometryOffsetType *offsetType*, double *bevelRatio*, double *flattenError*)

Returns an offset version of the input geometry.

*geometry*- The input geometry.*distance*- The offset distance for the new geometry.*offsetType*- The GeometryOffsetType to produce in the resulting geometry.*bevelRatio*- The ratio used to produce a bevel join instead of a miter join (used only when the offset type is Miter).*flattenError*- The maximum distance of the resulting segments compared to the`true`

circular arc (used only when offsetType is GeometryOffsetType::Rounded).

The offset operation creates a geometry that is a constant distance from the input geometry. This is similar to buffering, but produces a one-sided result instead of one that surrounds the input geometry. If *distance* > 0 then the offset geometry is constructed to the right of the input geometry, otherwise it is constructed to the left.

`[static] `

bool GeometryEngine::overlaps(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* and *geometry2* overlap.

Two geometries overlap when they have the same dimension and when their intersection result is a geometry of the same dimension. If the intersection result is a geometry with a lesser dimension than the input geometries, then method returns `false`

.

For example: two input polygons must return a polygon to overlap. If two polygons intersect each other at exactly one point then no overlap has occurred because the intersection result is a point whose dimension is zero.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::project(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::SpatialReference &*spatialReference*)

Projects the given geometry from its current spatial reference system into the given spatial reference system.

A default best-choice DatumTransformation is applied to the project operation. To control the specific transformation used, use GeometryEngine::project(geometry, spatialReference, datumTransformation).

If the geometry parameter has z-values, those z-values are also transformed as long as both the SpatialReference of that *geometry* and the *spatialReference* parameter have a vertical coordinate system.

*geometry*- The input geometry.*spatialReference*- The output spatial reference.

Returns the geometry projected into the given SpatialReference. If the input geometry has no SpatialReference, no projection occurs; instead, an identical geometry with the given SpatialReference is returned.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::project(const Esri::ArcGISRuntime::Geometry &*geometry*, const Esri::ArcGISRuntime::SpatialReference &*spatialReference*, Esri::ArcGISRuntime::DatumTransformation **datumTransformation*)

Projects the given geometry from its current spatial reference system into the given output spatial reference system, applying the datum transformation provided.

Use this overload to project a geometry if the difference between the input geometry's *spatialReference* and the output *spatialReference* involves a change of datum, and you do not wish to use the default datum transformation used by GeometryEngine::project.

If the input geometry has a null SpatialReference, no projection occurs; instead, an identical geometry with the given SpatialReference is returned.

Supports true curves. Projecting curves located at poles and coordinate system horizons using ArcGIS Runtime may give results that differ slightly from other ArcGIS software because ArcGIS Runtime uses a different geometry projection function.

*geometry*- The input geometry.*spatialReference*- The output spatial reference.*datumTransformation*- The datum transformation that describes how coordinates are converted from one coordinate system to another. Using a HorizontalVerticalTransformation here also transforms the z-values of the geometry, if the geometry parameter has z-values, and both the SpatialReference of the geometry parameter, and the output SpatialReference, have a vertical coordinate system set.

This function was introduced in Esri::ArcGISRuntime 100.2.

`[static] `

bool GeometryEngine::relate(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*, const QString &*relation*)

Returns whether *geometry1* and *geometry2* have a specific spatial *relation*.

The Dimensionally Extended 9 Intersection Model (DE-9IM) matrix *relation* (encoded as a string) to test against the relationship of the two geometries. This string contains the test result of each intersection represented in the DE-9IM matrix. Each result is one character of the string and may be represented as either a number (maximum dimension returned: '0','1','2'), a Boolean value ('T' or 'F'), or a mask character (for ignoring results: '*').

For example, each of the following DE-9IM string codes are valid for testing whether a polygon geometry completely contains a line geometry: "TTTFFTFFT" (Boolean), "T*****FF*" (ignore irrelevant intersections), or "102FF*FF*" (dimension form). Each returns the same result.

See DE-9IM and this help page for more information about the DE-9IM model and how string codes are constructed.

Supports true curves.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::removeM(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns a copy of the given *geometry* with its m-values removed.

The resulting geometry will have hasM false. If the given geometry has no m-values, a new object to the same underlying geometry is returned so this is an inexpensive call.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::removeZ(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns a copy of the given *geometry* with its z-coordinate removed.

The resulting geometry will have Geometry::hasZ false. If the given geometry has no z-coordinate, a new object to the same underlying geometry is returned so this is an inexpensive call.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::removeZAndM(const Esri::ArcGISRuntime::Geometry &*geometry*)

Returns a copy of the given *geometry* with its z-coordinates and m-values removed.

The resulting geometry will have both Geometry::hasZ and Geometry::hasM false. If the given geometry has no z-coordinate and no m-values, a new object to the same underlying geometry is returned so this is an inexpensive call.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Multipart GeometryEngine::reshape(const Esri::ArcGISRuntime::Multipart &*geometry*, const Esri::ArcGISRuntime::Polyline &*reshaper*)

Returns a polygon or polyline reshaped with a single path polyline.

*geometry*- The polygon or polyline to be reshaped.*reshaper*- The single path polyline reshaper.

For polygons, only individual paths can be reshaped. However, polylines can be reshaped across paths. If the geometry cannot be reshaped by the input reshaper, then an empty polygon or polyline is returned.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::sectorGeodesic(const Esri::ArcGISRuntime::GeodesicSectorParameters &*parameters*)

Returns a geodesic sector defined by a geodesic arc and two radii.

*parameters*- The GeodesicSectorParameters to use.

This method can produce a sector as a polygon, polyline or multipoint geometry.

A geodesic sector is defined by a geodesic elliptical arc and two radii extending from the center point of the arc to the points where they each intersect the arc.

The arc is a portion of an ellipse. The ellipse is defined by a center point, the lengths of its semi-major and semi-minor axes, and the direction of its semi-major axis.

The first radius of the sector is defined by the start direction angle relative to the direction of the semi-major axis. The second radius is the sum of the start direction and the sector angle.

Supports true curves.

This method returns an empty geometry when:

`parameters`

is empty.- parameters.center is empty or is outside the horizon of the spatial reference.
- parameters.center does not contain a valid spatial reference or is a local spatial reference.
- parameters.geometryType is Envelope or Point.
- Either semi-axis length is less than zero.

**See also **GeodesicSectorParameters.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::setM(const Esri::ArcGISRuntime::Geometry &*geometry*, double *m*)

Returns a copy of a geometry with the supplied M ordinate.

*geometry*- A geometry.*m*- The M ordinate.

If the given geometry already has m-values, they are replaced within the resulting geometry by the supplied m-value. The resulting geometry has Geometry::hasM `true`

.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::setZ(const Esri::ArcGISRuntime::Geometry &*geometry*, double *z*)

Returns a copy of a geometry with the supplied z-coordinate.

*geometry*- A geometry.*z*- The z-coordinate.

If the given geometry already has z-coordinates, they are replaced within the resulting geometry by the supplied z-value. The resulting geometry will have Geometry::hasZ `true`

.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::setZAndM(const Esri::ArcGISRuntime::Geometry &*geometry*, double *z*, double *m*)

Returns a copy of a geometry with the supplied z-coordinate and m-value.

*geometry*- A geometry.*z*- The z-coordinate.*m*- The m-value.

If the given geometry already has z-coordinates or m-values, they will be replaced in the resulting geometry by the supplied z-values and m-values. The resulting geometry will have both Geometry::hasZ and Geometry::hasM `true`

.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::simplify(const Esri::ArcGISRuntime::Geometry &*geometry*)

Simplifies the given geometry to make it topologically consistent according to its geometry type.

*geometry*- The input geometry.

Returns a simplified copy of the input geometry. Supports true curves.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::symmetricDifference(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns a geometry that represents the symmetric difference between *geometry1* and *geometry2*.

The symmetric difference includes the parts which are in either of the geometries, but not in both.

`[static] `

bool GeometryEngine::touches(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether the borders of *geometry1* and *geometry2* touch.

Supports true curves.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::unionOf(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns the union of *geometry1* and *geometry2*.

Both input geometries must be of the same geometry type and share the same spatial reference.

Supports true curves.

`[static] `

Esri::ArcGISRuntime::Geometry GeometryEngine::unionOf(const QList<Esri::ArcGISRuntime::Geometry> &*geometries*)

Returns the union of the *geometries* in the list.

All geometries must be of the same geometry type and share the same spatial reference.

Supports true curves.

This function was introduced in Esri::ArcGISRuntime 100.1.

`[static] `

bool GeometryEngine::within(const Esri::ArcGISRuntime::Geometry &*geometry1*, const Esri::ArcGISRuntime::Geometry &*geometry2*)

Returns whether *geometry1* is completely within *geometry2*.