buffering polygons

Dec 29, 2010 at 7:15 AM


Is someone know a way to buffering polygons. I'd found nothing in the reference manual, so i suppose it is necessary to programming something.

I need to buffering a group of polygons, merge all of them and finish with a negative buffer to have an unique polygon containing all others.

Dec 30, 2010 at 11:37 AM

Try using


shpBuffer = shp1.Buffer(5, 16);
shp1.Clip(shp2, tkClipOperation.clUnion);

And perhaps the ConvuxHull method might help you as well.






Jan 3, 2011 at 3:07 PM

I'm using VB6

I'd try tu use buffer but the program shutdown, i don't know why, is this function is available with VB6?

is there any differences between

shp1.Clip(shp2, tkClipOperation.clUnion)
Set SFShape = utils.ClipPolygon(UNION_OPERATION, polyg1, polyg2)


Jan 4, 2011 at 10:56 PM

Make sure you have current version of geos_c.dll in the same folder with MapWinGIS. Buffer and clip operations use it. 

As for the difference: not particular, both are using GEOS library.

Jan 5, 2011 at 10:29 AM

thanks for your help.

I'm using the MapWinGIS47SRa-x86-Setup.exe to install mapwingis.ocx and dependencies.

I'd tried to reinstall, and now a have an error message when the program arrived on the line using the buffer method. it says "bibliotheque non inscrite " in french. it means 'Unregistered library'

I'd tried to copy-paste geos_c.dll in the same folder than the app : nothing better.


Jan 5, 2011 at 10:35 AM

something to add

before in the program, there's this line :

Set SFShape = utils.ClipPolygon(UNION_OPERATION, Polyg1, Polyg2)

and it works. SO geos_c.dll seems to be register!

Jan 5, 2011 at 11:53 AM


I'd made a mistake

needed to wrote 'Set SFShape = Polyg1.Buffer(500, 50)' instead of 'SFShape = Polyg1.Buffer(500, 50)'

it works fine now