union static method
Calculates the union of the two geometries.
The union combines those parts of the two geometries which overlap into a single geometry.
Returns all parts of the two input geometries combined into a single geometry. The order of the input parameters is irrelevant. If the two geometries have different dimensionality, the geometry with the higher dimensionality is returned. For example, a polygon is returned if the given geometries are Polygon and ArcGISPoint.
Supports true curves.
Parameters:
geometry1
— A geometry object.geometry2
— Another geometry object.
Return Value: The union of the two geometries.
Implementation
static Geometry union(
{required Geometry geometry1, required Geometry geometry2}) {
_initializeArcGISEnvironmentIfNeeded();
final objectHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_GeometryEngine_union(
geometry1._handle, geometry2._handle, errorHandler);
});
return Geometry._fromHandle(objectHandle)!;
}