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(Geometry, Geometry) 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.

Since

200.1.0