crosses static method

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

Test if geometry1 crosses geometry2.

Two polylines cross if their intersection contains only points, and at least one of the points of intersection is internal to both polylines. A polyline and polygon cross if a connected part of the polyline is partly inside and partly outside the polygon. A polyline and polygon cross if they share a polyline in common on the interior of the polygon, which is not equal to the entire polyline. The target and join features must be either polylines or polygons.

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 geometry1 crosses geometry2, false otherwise.

Implementation

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