[postgis-users] ST_Buffer returning multipolygons

Nicolas Ribot nicolas.ribot at gmail.com
Fri Jan 18 01:58:43 PST 2013


Hi,

A precision: st_buffer can return a MP even on a regular polygon
See attached picture: internal buffer (negative distance) on the green
Polygon:

select st_astext(
    st_buffer('POLYGON (( 118 270, 216 270, 172 211, 219 149, 96 150, 151
212, 118 270 ))'::geometry, -15)
);

Nicolas
Inline images 1<https://mail.google.com/mail/?ui=2&ik=88069d0285&view=att&th=13c4d147b089db7d&attid=0.2&disp=safe&realattid=ii_13c4d146ce567f6f&zw>


On 18 January 2013 07:44, Francois Hugues <hugues.francois at irstea.fr> wrote:

> Hello,
>
> If your input is a multipolygon, st_buffer may return a multipolygon
> since your buffered the buffered polygons which compose your
> multigeometry may not intersect each other.
>
> Hugues.
>
>
>
>
>
> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org
> [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of marquz74
> Sent: Friday, January 18, 2013 12:41 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] ST_Buffer returning multipolygons
>
> Hi to all,
> I'm practicing with ST_buffer on North Carolina Dataset (nc_spm_08).
> By running the following query:
>
> SELECT GeometryType(sub.buffer)
> FROM (
>         SELECT st_buffer (the_geom, 100) AS buffer
>         FROM streams
> ) AS sub
> WHERE
>         GeometryType(sub.buffer)  <> 'POLYGON';
>
> I've been getting some MULTIPOLYGON records.
> Is it possible? I guessed ST_Buffer could return POLYGON geometries
> only...
> was I wrong?
>
> Thanks in advance.
>
> Marco
>
>
>
> --
> View this message in context:
> http://postgis.17.n6.nabble.com/ST-Buffer-returning-multipolygons-tp5002
> 333.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130118/2feff714/attachment.html>


More information about the postgis-users mailing list