How to use Accurate_ClipPolygonWithLine to segment a polygon?

Jan 24, 2011 at 10:40 PM

I need to segment a polygon using crossing lines that completely cross the polygon.  I can not figure out a way to do this.  It looks like "Accurate_ClipPolygonWithLine" takes one polygon and one line as input.  Any ideas how I can do this with more than one line?  Also, when I input just 1 line, the polygon segments that return in the IFeatureSet are not polygons.  They are LineStrings.  I was expecting a Polygon.

Thank  you for your help.

Jan 24, 2011 at 10:55 PM

Try closing the shape created by the "crossing lines" so that you have a polygon.  You can then calculate the Intersection programmatically using FeatureSet, and individual Feature, or even the Polygon geometry itself.  You can probably close the lines programmatically with the help of the "extent" rectangle of the polygon you are attempting to apply the clipping on.  I am not aware of why Accurate_ClipPolygonWithLine would return LineStrings.  Most of the tools were written by other folks, but I can help more if you are working directly with the core framework.