ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / DropZs Method / DropZs(Geometry,Boolean) Method
The input geometry.
If true, then a new geometry is returned with the Geometry.HasZ property set to true no matter if the input geometry has the property set to true or not. If false and the geometry Geometry.HasZ property is false, then an exception will be thrown.
Version

DropZs(Geometry,Boolean) Method
Sets all the Z-values to NaN.
Syntax

Parameters

geometry
The input geometry.
allowNonZGeometry
If true, then a new geometry is returned with the Geometry.HasZ property set to true no matter if the input geometry has the property set to true or not. If false and the geometry Geometry.HasZ property is false, then an exception will be thrown.

Return Value

The geometry with the Z-values set to NaN. If the geometry is empty and the Geometry.HasZ property is true, then the input geometry is returned unchanged. Otherwise, if allowNonZGeometry is true, a new geometry is returned with the Geometry.HasZ property set to true.
Exceptions
ExceptionDescription
Geometry is null.
This geometry is not Z-Aware and allowNonZGeometry is false.
The method is not implemeted for GeometryBag.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also