AnsweredAssumed Answered

Calculate Closure residual error programmatically

Question asked by israeluv on Jan 28, 2020

Using ArcObject SDK for .NET. How can I calculate the Closure error like is displayed at Parcel Details Window:

Or there is a way to retrieve this information?

 

I found the method CalculateAdjustment and CalculateClosure, from ITraverseAdjustment, but the misclosure returned is 0. when a build a polyline from the parcel lines.

 

Thanks in advance.

 

some code:

//Test for Closure Calculation
ESRI.ArcGIS.Editor.ITraverseAdjustment traverseAdjustment = new ESRI.ArcGIS.Editor.TraverseAdjustment();

ESRI.ArcGIS.Geometry.IPolyline polyline = new ESRI.ArcGIS.Geometry.Polyline() as ESRI.ArcGIS.Geometry.IPolyline;
var fromPoint = new ESRI.ArcGIS.Geometry.Point();
fromPoint.X = 548250;
fromPoint.Y = 711700;

var point1 = new ESRI.ArcGIS.Geometry.Point();
point1.X = 548350; //+100
point1.Y = 711700;

var point2 = new ESRI.ArcGIS.Geometry.Point();
point2.X = 548350;
point2.Y = 711600; //+100

var point3 = new ESRI.ArcGIS.Geometry.Point();
point3.X = 548251;
point3.Y = 711600; //-100

var point4 = new ESRI.ArcGIS.Geometry.Point();
point4.X = 548250;
point4.Y = 711700;

((ESRI.ArcGIS.Geometry.IPointCollection)polyline).AddPoint(fromPoint);
((ESRI.ArcGIS.Geometry.IPointCollection)polyline).AddPoint(point1);
((ESRI.ArcGIS.Geometry.IPointCollection)polyline).AddPoint(point2);
((ESRI.ArcGIS.Geometry.IPointCollection)polyline).AddPoint(point3);
((ESRI.ArcGIS.Geometry.IPointCollection)polyline).AddPoint(point4);

 

var resultPolyline = traverseAdjustment.CalculateAdjustment(polyline, point4, ESRI.ArcGIS.Editor.esriAdjustmentType.esriAdjustmentTypeCompass);

var segmentCollection = ((ESRI.ArcGIS.Geometry.ISegmentCollection)resultPolyline);

 

 

 

Outcomes