UnionShapesVB - sindizzy/DSW GitHub Wiki
Union Intersecting Shapes in a FeatureSet
This example shows how to use a newly added extension method that allows for intersecting shapes in the same Shapefile to be Unioned, but leaving shapes that don't overlap unchanged.
[Image:UnionIntersecting.png)(Image_UnionIntersecting.png)
Public Sub UnionShapes()
Dim fs As New FeatureSet()
fs.Open()
Dim result As IFeatureSet = fs.UnionShapes(ShapeRelateType.Intersecting)
Dim sfd As New SaveFileDialog()
sfd.Filter = "**Shapefiles (**.shp)|**.shp"
If sfd.ShowDialog() <> DialogResult.OK Then
Return
End If
result.SaveAs(sfd.FileName, True)
End Sub