ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / Generalize3D Method
The geometry to be generalized.
The maximum distance in meters that the output geometry can deviate from the input geometry.

In This Topic
    Generalize3D Method (GeometryEngine)
    In This Topic
    Performs the generalize operation on the geometry.
    public Geometry Generalize3D( 
       Geometry geometry,
       double maxDeviation
    Public Function Generalize3D( _
       ByVal geometry As Geometry, _
       ByVal maxDeviation As Double _
    ) As Geometry


    The geometry to be generalized.
    The maximum distance in meters that the output geometry can deviate from the input geometry.

    Return Value

    The generalized geometry. If the input geometry is empty, then it is returned unchanged.
    Geometry is null.
    The method is not implemented for GeometryBag or Multipatch.
    This geometry is not Z-Aware.
    The geometry is of an incorrect type. (i.e. a point or multipoint).
    Cannot do 3D operations on curve segments.
    Generalize3D performs a Douglas-Peucker Generalization algorithm, extended to operate in 3D space, with a specified maximum offset tolerance, given in 3D, as input. For line segments, the generalized output is a subset of the original input vertices. For non-linear segments, the generalized output contains points along all parts of the curve, not necessarily only the vertices. GeometryEngine Generalize3D
    Polyline generalizedPolyline = GeometryEngine.Instance.Generalize(polylineWithZ, 200) as Polyline;
    // generalizedPolyline.HasZ = true
    Polygon generalized3DPolyline = GeometryEngine.Instance.Generalize3D(polylineWithZ, 200) as Polygon;
    // generalized3DPolyline.HasZ = true
    // note that generalized3DPolyline and generalizedPolyline will have different definitions
    //  ie generalizedPolyline.IsEqual(generalized3DPolyline) = false

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also