ArcGIS Pro 2.8 API Reference Guide
GeodeticDensifyByDeviation Method (GeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class : GeodeticDensifyByDeviation Method
The geometry to be densified.
The maximum deviation allowed from the true curve. If maxDeviation is less than or equal to zero, the value of 50 km is used.
The linear unit of maxDeviation.
The type of curve that connects the vertices of the densified geometry.
Creates geodetic segments connecting existing vertices and densifies the segments.
Syntax
Public Function GeodeticDensifyByDeviation( _
   ByVal geometry As Geometry, _
   ByVal maxDeviation As Double, _
   ByVal deviationUnit As LinearUnit, _
   ByVal curveType As GeodeticCurveType _
) As Geometry

Parameters

geometry
The geometry to be densified.
maxDeviation
The maximum deviation allowed from the true curve. If maxDeviation is less than or equal to zero, the value of 50 km is used.
deviationUnit
The linear unit of maxDeviation.
curveType
The type of curve that connects the vertices of the densified geometry.

Return Value

The densified geometry.
Exceptions
ExceptionDescription
Geometry is null or empty.
The method is not implemented for GeometryBag or Multipatch.
The geomtry is of an incorrect type. (i.e. a point or multipoint).
Geometry does not have a spatial reference.
Spatial reference of geometryis an image coordinate system.
Example
List<Coordinate2D> coords = new List<Coordinate2D>()
{
  new Coordinate2D(-80, 0),
  new Coordinate2D(-20, 60),
  new Coordinate2D(40, 20),
  new Coordinate2D(0, -20),
  new Coordinate2D(-80, 0)
};

SpatialReference sr = SpatialReferences.WGS84;

// create a polyline
Polyline polyline = PolylineBuilder.CreatePolyline(coords, sr);

// densify in km
Polyline geodesicPolyline = GeometryEngine.Instance.GeodeticDensifyByDeviation(polyline, 200, LinearUnit.Kilometers, GeodeticCurveType.Geodesic) as Polyline;
// densify in m
geodesicPolyline = GeometryEngine.Instance.GeodeticDensifyByDeviation(polyline, 200, LinearUnit.Meters, GeodeticCurveType.Geodesic) as Polyline;

// Change curve type to Loxodrome
Polyline loxodromePolyline = GeometryEngine.Instance.GeodeticDensifyByDeviation(polyline, 200, LinearUnit.Meters, GeodeticCurveType.Loxodrome) as Polyline;
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GeometryEngine Class
GeometryEngine Members