intersects static method

bool intersects(
  1. {required Geometry geometry1,
  2. required Geometry geometry2}
)

Tests if two geometries intersect each other.

A geometry intersects another geometry if it shares any portion of its geometry with the other geometry feature. If either geometry contain, is within, crosses, touches, or overlaps the other geometry, they intersect.

This spatial relationship test is based on the Dimensionally Extended 9 Intersection Model (DE-9IM) developed by Clementini, et al., and is discussed further in the web pages: DE-9IM and Spatial relationships.

Supports true curves.

Parameters:

  • geometry1 — A geometry object.
  • geometry2 — Another geometry object.

Return Value: True if the two geometries intersect, false otherwise.

Implementation

static bool intersects(
    {required Geometry geometry1, required Geometry geometry2}) {
  _initializeArcGISEnvironmentIfNeeded();
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_intersects(
        geometry1._handle, geometry2._handle, errorHandler);
  });
}