There is a way to calculate polygon dimensions (Side) , if i ma working on ArcObject (Java or .NET) any suggestions ...
especially with complex polygon
I think the term is "perimeter" that you are looking for. Did you do a search using arcobjects perimeter first?
I am not looking for perimeter i am looking for dimensions for each side ...
see what i meant >>>
you can see code in this link : IPolygon4.ExteriorRingBag Property (ArcObjects .NET 10 SDK)
in this code when you loop on points you can get distance from point(i) to point(i+1) ...
... if your polygons are composed from only lines ...
Below my suggestion, never implemented this scenario personally before just a possible solution
Thanks Riyas for your post , i saw what you put and really interesting idea , but how i can do that in coding level , if
you have any idea plz help me ...thanks
Try below code.
Note: Even if there is a suttle change in direction between segments (i.e. not exactly 180 degree), it'll be treated as change and gets counted as different section.
Do post back if this worked.
ISegmentCollection segments = (ISegmentCollection)lta.Shape;
List<double> dimensions = new List<double>();
if (segments != null)
double length = 0;
for (int idx = 0; idx < segments.SegmentCount; idx++)
ISegment currentSegemnt = segments.get_Segment(idx);
if (idx + 1 < segments.SegmentCount)
ISegment otherSegment = segments.get_Segment(idx + 1);
if (currentSegemnt.ReturnTurnDirection(otherSegment) != 1)
length = 0;
Thanks for your post , really appropriate that m, let me test it today and i will give you the feedback ...
Retrieving data ...