Bangalore, India
One of our veteran GeoTools user, Andy Bills from Australia, asked me yesterday if it was possible to draw a boundary polyline that hugs the outermost edges of a bunch of adjacent closed polygons touching each other. We already have a command called GT_MERGEPOLY in GeoTools to do exactly that but it had become a bit rusty and needed some polish. We fixed that yesterday in response to Andy's request and now, we have a perfect tool in GeoTools V 12.17 to dissolve polygons and create a nice boundary polyline around them. In this post, I will show you how this can be done.
The GT_MERGEPOLY (Merge Adjacent Polygons) tool works on polylines, lines and arcs and merges (dissolves) them all together leaving only the outermost boundary (some common uses: to create TIN model boundary or parcel layout boundary).
Before you can use the GT_MERGEPOLY command, you will need to have closed polylines, lines or arcs to begin with. In the TIN_Points_MergePoly.DWG Sample that I have shown here, we started off with a TIN - so we had 3dfaces to begin with. First, we convert them to polylines using the GT_3DF2PL command. See screenshot below:
You can see in the sample DWG that there are gaps(islands) in the TIN model. Let us see what happens when you run the GT_MERGEPOLY command on this sample data set. The merge poly dialog box is shown below. You only need to select the layer into which the outline polygon(s) must go and select the objects.
Be warned: The GT_MERGEPOLY command can take a little long to process depending on how large your data-set is. It has to do a number of internal checks, and screen-based selection processing, but at the end of it all, you get a nice, clean outline polygon with all the inside edges dissolved and gone.
So, if you need to dissolve all your internal polygons and retain only the outermost peripheral boundary polygon, GT_MERGEPOLY is the way to go.
Discover Bricscad, discover GeoTools-AutoCAD & GeoTools-Bricscad, discover TechCenter . Brand new ways to work smarter in CAD!!
Comments
You can follow this conversation by subscribing to the comment feed for this post.