setZAndM static method

Geometry setZAndM({
  1. required Geometry geometry,
  2. required double z,
  3. required double m,
})

Return a copy of a geometry with the supplied z-coordinate and m-value.

If the given geometry already has z-coordinates or m-values, they are replaced in the resulting geometry by the supplied values. The resulting geometry has both Geometry.hasZ and Geometry.hasM values of true.

Supports true curves.

Parameters:

  • geometry — A geometry.
  • z — The z-coordinate.
  • m — The m-value.

Return Value: A copy of the given geometry with its z-coordinates and m-values set to the supplied values.

Implementation

static Geometry setZAndM({
  required Geometry geometry,
  required double z,
  required double m,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_setZAndM(
      geometry._handle,
      z,
      m,
      errorHandler,
    );
  });
  return Geometry._fromHandle(
    objectHandle,
  )!;
}