differenceOrNull

fun differenceOrNull(geometry1: Geometry, geometry2: Geometry): Geometry?

Constructs the set-theoretic difference between two geometries. This method returns a geometry consisting of the parts of geometry1 that are not in geometry2. It performs a spatial subtraction from the two input geometries. The order of the two input geometry arguments produces different results if they are switched. Think of the difference equation as:

A (Difference) B != B (Difference) A

Use GeometryEngine.symmetricDifferenceOrNull to get the parts that are in either geometry, but not in both.

Supports true curves.

Return

A new geometry object that represents the difference of the two given input geometries, or null if geometry1 and geometry2 do not have equivalent spatial references.

Since

200.1.0

Parameters

geometry1

A geometry object.

geometry2

The second geometry of dimension equal to or greater than the elements of the first geometry.