setZ static method

Geometry setZ(
  1. {required Geometry geometry,
  2. required double z}
)

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

If the given geometry already has z-coordinates, they are replaced within the resulting geometry by the supplied value. The resulting geometry has a Geometry.hasZ value of true.

Supports true curves.

Parameters:

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

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

Implementation

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