convexHull static method

Geometry convexHull(
  1. Geometry geometry
)

Calculates the minimum bounding geometry (convex hull) that completely encloses the given geometry.

The convex hull is the minimal bounding geometry that encloses the input geometry, such that all outer angles are convex. If you imagine a rubber band stretched around the input geometry, the rubber band takes the shape of the convex hull.

Parameters:

  • geometry — A geometry object.

Return Value: The minimum bounding geometry that completely encloses the given geometry.

Implementation

static Geometry convexHull(
  Geometry geometry,
) {
  _initializeArcGISEnvironmentIfNeeded();
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_convexHull(
      geometry._handle,
      errorHandler,
    );
  });
  return Geometry._fromHandle(
    objectHandle,
  )!;
}