Parameters
- geometry
- The geometry to replace non simple Zs.
- zValue
- The Z-value to assign.
Return Value
A geometry in which each coordinate has a simple (non-NaN) Z-value. If the input geometry is empty, then it is returned unchanged.
| Exception | Description |
|---|---|
| System.ArgumentNullException | Geometry is null. |
| System.NotImplementedException | The method is not implemented for GeometryBag. |
| System.InvalidOperationException | This geometry is not Z-Aware. |
{
List<Coordinate3D> coordsZ =
[
new Coordinate3D(1, 2, double.NaN),
new Coordinate3D(4, 5, 3),
new Coordinate3D(7, 8, double.NaN)
];
polygon = PolygonBuilderEx.CreatePolygon(coordsZ);
// polygon.HasZ = true
Polygon polygonZReplaced = GeometryEngine.Instance.ReplaceNaNZs(polygon, -1) as Polygon;
// polygonZReplaced.Points[0].Z = -1
// polygonZReplaced.Points[1].Z = 3
// polygonZReplaced.Points[2].Z = -1
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)