GeometryEngine class abstract final

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

Capabilities include:

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

GeometryEngine provides both planar (Euclidean) and geodetic versions of many operations. Be aware that methods named with only the operation are the planar versions (GeometryEngine.buffer, for example), while the geodetic equivalent has "Geodetic" appended to the name (for example GeometryEngine.bufferGeodetic).

Planar methods are suitable for data with a projected coordinate system, especially for local, large-scale areas. Geodetic methods are better suited to data with a geographic spatial reference (see SpatialReference.isGeographic), especially for large-area, small-scale use.

Most GeometryEngine methods require inputs to have equivalent spatial references. The methods which have more than one geometry parameter, or have a separate spatial reference parameter which could conflict with that of the geometry, will throw if the spatial references are not equivalent. Exceptions to this rule (for example GeometryEngine.rotate are highlighted in the method documentation.

Constructors

GeometryEngine()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

area({required Geometry geometry}) double
Calculates the area of the given geometry.
areaGeodetic({required Geometry geometry, AreaUnit? unit, required GeodeticCurveType curveType}) double
Calculates the geodetic area of the given geometry using a geodetic curve.
autoComplete({required List<Polygon> existingBoundaries, required List<Polyline> newBoundaries}) List<Polygon>
Fills the closed gaps between polygons using polygon boundaries and polylines as the boundary for the new polygons.
boundary({required Geometry geometry}) Geometry
Calculates the boundary of the given geometry.
buffer({required Geometry geometry, required double distance}) Polygon
Creates a buffer polygon at the specified distance around the given geometry. This is a planar buffer operation. Use GeometryEngine.bufferGeodetic to produce geodetic buffers.
bufferCollection({required List<Geometry> geometries, required List<double> distances, required bool unionResult}) List<Polygon>
Creates a buffer or buffers relative to the given collection of geometries. This is a planar buffer operation. Use GeometryEngine.bufferGeodetic to produce geodetic buffers.
bufferGeodetic({required Geometry geometry, required double distance, LinearUnit? distanceUnit, required double maxDeviation, required GeodeticCurveType curveType}) Polygon
Creates a buffer polygon at the specified distance around the given geometry, calculated using a geodetic curve.
bufferGeodeticCollection({required List<Geometry> geometries, required List<double> distances, LinearUnit? distanceUnit, required double maxDeviation, required GeodeticCurveType curveType, required bool unionResult}) List<Polygon>
Creates and returns a geodetic buffer or buffers relative to the given collection of geometries.
clip({required Geometry geometry, required Envelope envelope}) Geometry
Constructs the portion of a geometry that intersects an envelope.
combineExtents({required Geometry geometry1, required Geometry geometry2}) Envelope
Returns an Envelope representing the minimum extent that encloses both geometry1 and geometry2.
combineExtentsCollection({required List<Geometry> geometries}) Envelope
Returns an Envelope representing the minimum extent that encloses all geometries in the given collection.
contains({required Geometry geometry1, required Geometry geometry2}) bool
Tests if geometry1 contains geometry2.
convexHull({required Geometry geometry}) Geometry
Calculates the minimum bounding geometry (convex hull) that completely encloses the given geometry.
convexHullCollection({required List<Geometry> geometries, required bool merge}) List<Geometry>
Calculates the minimum bounding geometry (convex hull) for the geometries in the given collection.
createPointAlong({required Polyline polyline, required double distance}) ArcGISPoint
Return the point at the given distance along the line.
crosses({required Geometry geometry1, required Geometry geometry2}) bool
Test if geometry1 crosses geometry2.
cut({required Geometry geometry, required Polyline cutter}) List<Geometry>
Cuts the 'geometry' into parts with the 'cutter' Polyline.
densify({required Geometry geometry, required double maxSegmentLength}) Geometry
Densifies the input geometry by inserting additional vertices along the geometry at an interval defined by maxSegmentLength.
densifyGeodetic({required Geometry geometry, required double maxSegmentLength, LinearUnit? lengthUnit, required GeodeticCurveType curveType}) Geometry
Densifies the input geometry by creating additional vertices along the geometry, using a geodetic curve.
difference({required Geometry geometry1, required Geometry geometry2}) Geometry
Constructs the set-theoretic difference between two geometries.
disjoint({required Geometry geometry1, required Geometry geometry2}) bool
Tests if the two geometries are disjoint.
distance({required Geometry geometry1, required Geometry geometry2}) double
Calculates the simple planar (Euclidean) distance between two geometries.
distanceGeodetic({required ArcGISPoint point1, required ArcGISPoint point2, LinearUnit? distanceUnit, AngularUnit? azimuthUnit, required GeodeticCurveType curveType}) GeodeticDistanceResult
Calculates the geodetic distance between two given points and calculates the azimuth at both points for the geodetic curve that connects the points.
ellipseGeodesic({required GeodesicEllipseParameters parameters}) Geometry
Constructs a geodesic ellipse centered on a specific point.
equals({required Geometry geometry1, required Geometry geometry2}) bool
Tests if two geometries are equal.
extend({required Polyline polyline, required Polyline extender, required GeometryExtendOptions extendOptions}) Polyline?
Extends a polyline using a polyline as the extender using the type of extension specified with extendOptions.
fractionAlong({required Polyline line, required ArcGISPoint point, required double tolerance}) double
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.
generalize({required Geometry geometry, required double maxDeviation, required bool removeDegenerateParts}) Geometry
Generalizes the given geometry by removing vertices based on the Douglas-Poiker algorithm.
intersection({required Geometry geometry1, required Geometry geometry2}) Geometry
Calculates the intersection of two geometries.
intersections({required Geometry geometry1, required Geometry geometry2}) List<Geometry>
Calculates the intersection of two geometries.
intersects({required Geometry geometry1, required Geometry geometry2}) bool
Tests if two geometries intersect each other.
isSimple({required Geometry geometry}) bool
Test if the geometry is topologically simple.
labelPoint({required Polygon polygon}) ArcGISPoint
Calculates an interior point for the given polygon. This point can be used by clients to place a label for the polygon.
length({required Geometry geometry}) double
Calculates the length of the given geometry.
lengthGeodetic({required Geometry geometry, LinearUnit? lengthUnit, required GeodeticCurveType curveType}) double
Calculates the geodetic length of the geometry.
move({required Geometry geometry, required double deltaX, required double deltaY}) Geometry
Moves the provided geometry by the specified distances along the x-axis and y-axis.
moveGeodetic({required List<ArcGISPoint> pointCollection, required double distance, LinearUnit? distanceUnit, required double azimuth, AngularUnit? azimuthUnit, required GeodeticCurveType curveType}) List<ArcGISPoint>
Moves each point in the point collection in a specified direction by a geodetic distance.
nearestCoordinate({required Geometry geometry, required ArcGISPoint point}) ProximityResult?
Determines the nearest point in the input geometry to the input point using a simple planar measurement.
nearestCoordinateGeodetic({required Geometry geometry, required ArcGISPoint point, required double maxDeviation, LinearUnit? deviationUnit}) ProximityResult?
Determines the nearest point in the input geometry to the input point, by using a shape preserving geodetic approximation of the input geometry.
nearestVertex({required Geometry geometry, required ArcGISPoint point}) ProximityResult?
Returns a ProximityResult that describes the nearest vertex in the input geometry to the input point.
normalizeCentralMeridian({required Geometry geometry}) Geometry?
Normalizes the input geometry so that it does not intersect the antimeridian. This may be necessary when wrap around is enabled on the map.
offset({required Geometry geometry, required double distance, required GeometryOffsetType offsetType, required double bevelRatio, required double flattenError}) Geometry
Creates an offset version of the input geometry.
overlaps({required Geometry geometry1, required Geometry geometry2}) bool
Tests if two geometries overlap.
project(Geometry geometry, {required SpatialReference outputSpatialReference, DatumTransformation? datumTransformation}) Geometry
Projects the given geometry from its current spatial reference system into the given output spatial reference system, applying the datum transformation provided.
relate({required Geometry geometry1, required Geometry geometry2, required String relation}) bool
Test if the two geometries are related using a custom relation.
removeM({required Geometry geometry}) Geometry
Return a copy of the given geometry with its m-values removed.
removeZ({required Geometry geometry}) Geometry
Return a copy of the given geometry with its z-coordinate removed.
removeZAndM({required Geometry geometry}) Geometry
Return a copy of the given geometry with its z-coordinates and m-values removed.
reshape({required Multipart geometry, required Polyline reshaper}) Multipart?
Reshape polygons or polylines with a single path polyline.
rotate({required Geometry geometry, required double angle, ArcGISPoint? origin}) Geometry
Rotates the geometry by the specified angle of rotation around the provided origin point.
scale({required Geometry geometry, required double scaleX, required double scaleY, ArcGISPoint? origin}) Geometry
Scales the given geometry by the specified factors from the specified origin point.
sectorGeodesic({required GeodesicSectorParameters parameters}) Geometry
Constructs a geodesic sector defined by a geodesic arc and 2 radii.
setM({required Geometry geometry, required double m}) Geometry
Return a copy of a geometry with the supplied m-value.
setZ({required Geometry geometry, required double z}) Geometry
Return a copy of a geometry with the supplied z-coordinate.
setZAndM({required Geometry geometry, required double z, required double m}) Geometry
Return a copy of a geometry with the supplied z-coordinate and m-value.
simplify({required Geometry geometry}) Geometry
Simplifies the given geometry to make it topologically consistent according to its geometry type.
symmetricDifference({required Geometry geometry1, required Geometry geometry2}) Geometry
Calculates the symmetric difference (exclusive or) of the two geometries.
touches({required Geometry geometry1, required Geometry geometry2}) bool
Test if the two geometries have at least one boundary point in common, but no interior points.
union({required Geometry geometry1, required Geometry geometry2}) Geometry
Calculates the union of the two geometries.
unionCollection({required List<Geometry> geometries}) Geometry
Calculates the union of a collection of geometries.
within({required Geometry geometry1, required Geometry geometry2}) bool
Tests if geometry1 is within geometry2.