Polygon from IPointCollection

1915
1
05-27-2010 06:58 AM
NigelTait
New Contributor
Hello

I have a query regarding the creation of a polygon from an IPointCollection (see attached).

I have 2 IPolylines (A and B) that are closed circles.  A is created via ConstructOffset of B.  Both A and B have IPointCollections that start and finish at X and vertices that travel in a clockwise direction.

My aim is to create a polygon out of these two lines by the insertion of the red line at C.

My thinking is that the vertices in boundary of the new Polygon should start at X and travel clockwise around A, back to X.  Then down the red line and anticlockwise around B until reaching the redline and back up to X.

I have reversed the orientation of the vertices in IPointCollection B and added both A and B IPointCollections to a new Polygon point collection.

However I get a solid donut polygon with a hole, the red line seems to be ignored.

Any assistance appreciated...

Nigel
0 Kudos
1 Reply
AlexanderGray
Occasional Contributor III
all lines in a polygon must define either an outer or an inner ring.  The red line defines neither and is therefor removed during simplify.  An easy way to see if it will work is to try it in ArcMap.  Make a polygon that snaps back to itself in two consecutive vertices like your diagram.  The result is a straight donut polygon.  I think the only way to make something that looks like what you have is to introduce a small gap at position X.
0 Kudos