internal double GetGeodeticLengthFromPolyline(IPolyline polyline)
{
if (polyline == null)
return 0.0;
var polycurvegeo = polyline as IPolycurveGeodetic;
var geodeticType = GetEsriGeodeticType();
var linearUnit = GetLinearUnit();
var geodeticLength = polycurvegeo.get_LengthGeodetic(geodeticType, linearUnit);
return geodeticLength;
}