[mapguide-users] Buffer Operation Returning Bad Geometry

alkamin alexander.s.kaminsky at gmail.com
Thu Jan 16 12:05:42 PST 2014

We're attempting to generate the geometry of a buffer of an arbitrary number
of source geometries.  We've written a .php file to handle the logic.   

We have run into some issues with the formation of the resulting geometry

1. If the MgMultiGeometry contains anything but linestrings and the buffer
generates a polygon with an inner ring, the order of the rings is flipped.   

2. There are also a few cases where buffering a single contiguous polygon
results in a buffer geometry with multiple parts, some of which appear
extraneous, causing the proper buffer geometry to be considered an inner

3. What should be a multigeometry (multiple non-overlapping geometries) is
being output as a single geometry, causing all geometries but the first to
be treated as inner rings. 

Our process is: 

1. Get array of WKT strings and a single distance value 

2. Read each WKT string with WKTReaderWriter and add the resulting
geometries to an MgGeometryCollection 

3. Use MgGeometryFactory to convert the MgGeometryCollection to an

4. Get appropriate MgMeasure from MgCoordinateFactory 

5. Use buffer method of the MgMultiGeometry with distance value and the

6. Pass result through WKTReaderWriter to obtain WKT string of buffer

It seems to be an issue with the Buffer method as we've checked the WKT
strings being input very closely.  Any help on this would be greatly

View this message in context: http://osgeo-org.1560.x6.nabble.com/Buffer-Operation-Returning-Bad-Geometry-tp5098486.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list