[postgis-users] ST_Buffer returning multipolygons

Stephen V. Mather svm at clevelandmetroparks.com
Fri Jan 18 05:56:24 PST 2013


I would agree with Hugues, you likely have multilinestrings.

Look to http://www.bostongis.com/postgis_dump.snippet for how to explode these into linestrings and then buffer.  Something like:

WITH singlelinestrings AS
     (
     SELECT stusps, ST_Multi(ST_Collect(f.the_geom)) as singlegeom FROM
      (SELECT stusps, (ST_Dump(the_geom)).geom As the_geom FROM somestatetable ) As f
       GROUP BY stusps
     )
SELECT ST_Buffer(singlegeom) FROM singlelinestrings

Best,
Steve

  Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com


________________________________________
From: postgis-users-bounces at lists.osgeo.org [postgis-users-bounces at lists.osgeo.org] on behalf of Francois Hugues [hugues.francois at irstea.fr]
Sent: Friday, January 18, 2013 8:39 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] ST_Buffer returning multipolygons

Hi,

We don't know what are your original geometries or what kind of buffer
you apply (since you work with linestrings we can assume it is a
positive buffer). Maybe some of your linestrings are multilinestrings
with disjoint components.

Did you try GeomeryType (geom) group by Geometry types ? What about
st_dump(geom) ?

You may have some more information here :
http://postgis.net/docs/manual-2.0/using_postgis_dbmanagement.html#OGC_V
alidity

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 1:58 PM
To: postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] ST_Buffer returning multipolygons

Hi,
thank for your interest.
The input geometries are actually linestrings (streams layer), so I
don't understand why I get MP.

Marco.



--
View this message in context:
http://postgis.17.n6.nabble.com/ST-Buffer-returning-multipolygons-tp5002
333p5002337.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




More information about the postgis-users mailing list