Determining Interior rings of an Exterior Ring

3639
3
02-17-2015 03:57 AM
New Contributor II

Hi there

I hope that this is the correct forum for this.

I am new to ArcGIS runtime for .net (10.2.4), busy converting our ArcObjects to the new framework.

In 1 of my scenaria, I'm need to determine which rings are interior to which exterior ring (when having a multi-part shape).

I guess I could convert each ring into a geometry, and determine its area to figure out if its an interior or exterior ring, and then use the GeometryEngine.Contains or GeometryEngine.Within.

Is there a simpler way to achieve my goal?

Tags (1)
1 Solution

Accepted Solutions
Esri Frequent Contributor

Currently that is the way to go, or determining the ring orientation (there's a simple algorithm you can use by finding the top-most vertex and check if the next one is to the left or right of it).

3 Replies
Esri Frequent Contributor

Currently that is the way to go, or determining the ring orientation (there's a simple algorithm you can use by finding the top-most vertex and check if the next one is to the left or right of it).

New Contributor II

Thanks for the quick reply Morten.

Esri Frequent Contributor

Checking if the next point is to the left or to the right of your point P is not correct. You have to evaluate the sign of the angle (previous point, P, next point) (see curve orientation)