Dear All
There is a way to calculate polygon dimensions (Side) , if i ma working on ArcObject (Java or .NET) any suggestions ...
especially with complex polygon
Thanks
Hi Riyas
Thanks for your post , really appropriate that m, let me test it today and i will give you the feedback ...
thanks
Hi Najd,
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) { dimensions.Add(length); length = 0; } } else { dimensions.Add(length); } } }
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
Below my suggestion, never implemented this scenario personally before just a possible solution
... if your polygons are composed from only lines ...
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) ...
Dear Mr.Dan
I am not looking for perimeter i am looking for dimensions for each side ...
see what i meant >>>
I think the term is "perimeter" that you are looking for. Did you do a search using arcobjects perimeter first?
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.