isSimple static method

bool isSimple(
  1. {required Geometry geometry}
)

Test if the geometry is topologically simple.

ArcGISPoint geometry is always simple.

Multipoint geometries cannot have any points with exactly equal x and y.

Polyline geometries cannot have degenerate segments. When the polyline has no z, the degenerate segments are those that have a length in the xy plane less than or equal to the tolerance. When the polyline has z, the degenerate segments are those that are shorter than the tolerance in the xy plane, and the change in the z-value along the segment is less than or equal to the z-tolerance.

Polygon geometries are considered simple if the following is true:

  • Exterior rings are clockwise, and interior rings (holes) are counterclockwise.
  • Rings can touch other rings in a finite number of points.
  • Rings can be self-tangent in a finite number of points.
  • No segment length is zero.
  • Each path contains at least three non-equal vertices.
  • No empty paths allowed.
  • Order of rings does not matter.

Supports true curves.

Parameters:

  • geometry — The geometry object.

Return Value: True if the geometry object is simple, false otherwise.

Implementation

static bool isSimple({required Geometry geometry}) {
  _initializeArcGISEnvironmentIfNeeded();
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_isSimple(
        geometry._handle, errorHandler);
  });
}