[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] How to clean a geometrycollections table for
From:       Muhammad Imran <imranserver () yahoo ! com>
Date:       2011-11-24 17:09:52
Message-ID: 1322154592.66604.YahooMailClassic () web161305 ! mail ! bf1 ! yahoo ! com
[Download RAW message or body]


Hi Pierre,

You can try st_collectionextract(geometry, integer) to extract polygon geometery by \
specifying (3 == POLYGON as integer),  given your GEOMETRYCOLLECTION of points, lines \
and polygons.

Regards,
Muhammad Imran
ITC, The Netherlands


--- On Thu, 11/24/11, Pierre Racine <Pierre.Racine@sbf.ulaval.ca> wrote:

> From: Pierre Racine <Pierre.Racine@sbf.ulaval.ca>
> Subject: [postgis-users] How to clean a geometrycollections table for pgsql2shp?
> To: " (postgis-users@postgis.refractions.net)" \
>                 <postgis-users@postgis.refractions.net>
> Date: Thursday, November 24, 2011, 10:19 PM
> Hi,
> 
> When doing intersections between two tables containing many
> polygons the resulting table often contains
> geometrycollections of points, polylines and polygons. You
> have to clean such a table of point and lines if you want to
> export it as a polygon shapefile.
> 
> Isn't there a function in PostGIS to remove line and points
> from a table of geometrycollections?
> 
> SELECT ST_ExtractPolygons(geom) FROM mymessyresults ?
> 
> Thanks
> 
> Pierre 
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic