Merging Polygons

Topics: Algorithms, SharpMap v2.0
Sep 6, 2008 at 6:17 PM

Is there a method to merge polygons or does anyone know of a library that will do it? I have zip code boundaries and I would like to merge a group of them together to produce one simple polygon.

Sep 9, 2008 at 11:16 PM
Damn, no ideas from anyone? How about any tools that will do it from a command line execution? I can export a shapefile from Sharpmap and then merge?
Sep 9, 2008 at 11:42 PM
If they are adjacent then geom.Union(otherGeom) may be what you need.. hth jd
Sep 10, 2008 at 2:09 AM
Thanks, I looked into that and I wasnt able to figure it out. Probably quite easy but for whatever reason (most likely hangover on Saturday) I wasnt able to do it. But today I decided to upgrade my Dev instance of SQL from 2005 to 2008 and realized it has quite a few powerful spatial features built in. I also found a little toolkit on CodePlex ( that had a new aggregate with a buffer. That did the trick for me.
Sep 10, 2008 at 7:39 PM
To solve this problem I use NTS and sharpmap.

Dim _geo01 As Geometry = New WKTReader().Read(Me.txtWKT01.Text)
Dim _geo02 As Geometry = New WKTReader().Read(Me.txtWKT02.Text)
Dim _geo03 As GisSharpBlog.NetTopologySuite.Geometries.Geometry = Nothing

_geo03 = _geo01.Union(_geo02)