[postgis-users] polygon Extraction problem

Birgit Laggner birgit.laggner at vti.bund.de
Mon Oct 31 03:08:08 PDT 2011

Hi Bruce,

if you use ST_Dump like this, the resulting data type will be an array 
consisting of geometrie and path (internal number of the polygon). In 
order to just get the geometries, you would have to use this kind of query:

select (st_dump(shape)).geom as the_geom from weather_poly;

If you're writing this in a new table you will be able to access it with 



Am 27.10.2011 04:06, schrieb Clay, Bruce:
> I have a table of points extracted from a raster file. I perform the 
> following SQL on the table
> CREATE TABLE weather_poly as
> SELECT(pixel_val, ST_Transform(ST_Union(ST_Buffer(shape, 0.1)),4326)) FROM
> weather_points GROUP BY pixel_val;
> The resulting polygon is 13 multi-polygons one for each pixel value 
> instead of one polygon for every cluster of points.
> I can run the following SQL select ST_Dump(shape) from weather_poly a 
> to break the polygons so they appear as separate polygons in 
> Postgresql data view.
> When I try to view them in QGis the table does not show on the list of 
> available PostGis layers. The properties of the table in Postgresql 
> show the geometry to be ST_Dump not polygon.
> Is there a way to split the multi-polygon into individual polygons or 
> to build the original polygons separatly so they will show in QGis and 
> be accessable as such by GDAL based applications?
> Bruce
> This message and any enclosures are intended only for the addressee.  Please
> notify the sender by email if you are not the intended recipient.  If you are
> not the intended recipient, you may not use, copy, disclose, or distribute this
> message or its contents or enclosures to any other person and any such actions
> may be unlawful.  Ball reserves the right to monitor and review all messages
> and enclosures sent to or from this email address.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111031/adc3f95e/attachment.html>

More information about the postgis-users mailing list