[mapguide-users] RE: RE: Buffer rectangle

Martin Morrison martin.morrison at edsi.com
Sun Jul 8 22:58:25 EDT 2007


That buffer will be parallel on the sides of the rectangle, but on the corners it will curve.  

Take a piece of paper of paper and draw two rectangles like you want your buffer.  Now measure from the corner of the inner rect to the corner of the outer rect.  That distance is greater than your buffer size.  Now draw an arc in each corner the size of your buffer.  This will be the correct result.

Martin



-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org on behalf of Jim O'Leary
Sent: Sun 7/8/2007 3:55 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] RE: RE: Buffer rectangle
 

I am already calling the Buffer() method from an MgGeometry polygon with an
arbitrary number of x,y coordinates. However, the buffer that the method
returns is a circle, and not the shape of that polygon. 

I took my code from the Autodesk Dev Guide sample
selectfeaturesinbuffer.php, and also from buffer.php in the mapviewerphp
folder. Both of those programs also return a round buffer from an MgGeometry
polygon. Does this mean it is not possible to produce a rectangle polygon?

Thanks



Martin Morrison wrote:
> 
> Yes, but keep in mind that the corners of your buffer will be rounded.
> 
> Martin
> 
> 
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jim O'Leary
> Sent: Friday, July 06, 2007 10:54 AM
> To: mapguide-users at lists.osgeo.org
> Subject: [mapguide-users] RE: Buffer rectangle
> 
> 
> So you could select a point, make a small rectangle from it, and then
> make a
> buffer, which would also be a rectangle.
> 
> Thanks.
> 
> 
> Martin Morrison wrote:
>> 
>> A buffer is going to be the shape of a set distance from the edge of
> the
>> object selected.  If you select a point, you get a circle with a
> radius
>> the size of your buffer.  If you select a polygon you will get the
> rough
>> shape of the polygon offset by the size of the buffer.
>> 
>> Martin
>> 
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org
>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jim
> O'Leary
>> Sent: Friday, July 06, 2007 10:38 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: [mapguide-users] Buffer rectangle
>> 
>> 
>> Does MapGuide support rectangle buffers? It seems that the default
>> buffer it
>> produces is a circle.
>> 
>> Thanks.
>> -- 
>> View this message in context:
>> http://www.nabble.com/Buffer-rectangle-tf4035927s16610.html#a11465564
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> 
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Buffer-rectangle-tf4035927s16610.html#a11465860
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Buffer-rectangle-tf4035927s16610.html#a11492134
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4102 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070708/7ed156e3/attachment.bin


More information about the mapguide-users mailing list