symmetricDifference static method
Calculates the symmetric difference (exclusive or) of the two geometries.
Symmetric difference obtains those parts of the two input geometries that do not overlap. If you want to perform a more atomic-level difference operation where the spatial subtraction of two input geometries might look different if the order of the geometries were switched, consider using GeometryEngine.difference.
Supports true curves.
Parameters:
geometry1
— A geometry object.geometry2
— Another geometry object.
Return Value: The symmetric difference of the two geometries.
Implementation
static Geometry symmetricDifference({
required Geometry geometry1,
required Geometry geometry2,
}) {
_initializeArcGISEnvironmentIfNeeded();
final objectHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_GeometryEngine_symmetricDifference(
geometry1._handle,
geometry2._handle,
errorHandler,
);
});
return Geometry._fromHandle(
objectHandle,
)!;
}