## ClipPolygonWithLine

**Syntax**

bool ClipPolygonWithLine(ref MapWinGIS.Shape polygon, ref MapWinGIS.Shape line, ref MapWinGIS.Shapefile resultSF, System.Boolean speedOptimized)

**Summary**

Divides a polygon into multiple sections depending on where a
line crosses it. Saves the resulting

polygon sections to a new polygon shapefile.

**Parameters**

polygon |
The polygon to be divided. |

line |
The line that will be used to divide the polgyon. |

resultSF |
The in-memory shapefile where resulting polygons should be saved. |

speedOptimized |
True if a line follows the assumption that only one
intersection occurs for any 2pt segment. And only 2pt segments that have a point inside->outside or outside->inside will be tested for interesection. |

**Returns**

False if an error was encountered, true otherwise.

Visual Basic Net 2005 Example
Implementation Code

Visual C# 2005 Example Implementation
Code

Back to
ClipPolygonWithLine