GeodeticDensifyByDeviation Method (GeometryEngine)
Creates geodetic segments connecting existing vertices and densifies the segments.
Parameters
- geometry
- The geometry to be densified. Cannot be null and its spatial reference cannot be null.
- 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. If the input geometry is empty, then it is returned unchanged.
GeodeticDensifyByDeviation - polyline
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 = PolylineBuilderEx.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;
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.