[postgis-users] I used ST_Buffer in hope of creating a polygon around my original polygon (rectangle), but I ended up with a circle with the center point right at the center of the polygon

Kevin Neufeld kneufeld at refractions.net
Sun Jul 6 00:03:49 PDT 2008


googling1000 wrote:
> Hi,
> I'd appreciate it if someone can help me figure this out.
>
> I thought ST_Buffer will take in any geometry and make a "buffer" around
> that geometry.
>   
Yes, it does.
> So, if you give it a rectangular polygon, you will get a bigger rectangular
> polygon.
>   
Nope.  You'll get a bigger rectangular polygon ... with rounded corners. 
> But, I keep getting a circle, and it looks like postgis found the center of
> the polygon and made that point the center of the resulting circle.
>   
If you've made your buffer large enough, it would indeed look like a 
circle since all you'll see is the four rounded corners.

If you're after a larger rectangle, try simply expanding the bounding 
box using ST_Expand().  Alternatively, you could try ST_Scale().

Cheers,
-- Kevin



More information about the postgis-users mailing list