[postgis-users] Need help concatentating 60,000 polygon geometries

Scott Schulthess scott at topozone.com
Thu Oct 4 09:29:45 PDT 2007


Hello everyone,

 

I have a table with 60,000 rows. 

 

Each row has a geometry field that is a polygon.

 

I want to concatenate all of these geometry objects into one big
multipolygon, or at the very least, a polygon, so I can query easily on
one geometry object to see if a point lies within that multipolygon.

 

I have tried using geomuion, something like below

 

update layerindex set geom= (select
multi(geomunion(transform(geom,4326))) from stockdrgmeta where
sourcescale > 40000 and sourcescale < 80000) where layername='DRG50'

 

18 hours into this query I figured it didn't work.   A similar query
worked after a while on far less rows.  

 

I then tried using the collect() function, but I couldn't figure out a
way to turn the geometry collection that the function returns into a
multipolygon.

 

Please help.

 

Thanks!

 

____________________________________

Scott Schulthess | Web Developer

Maps a la carte, Inc / TopoZone.com  

http://www.topozone.com

http://www.linkedin.com/in/scottschulthess

scott at topozone dot com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071004/1abeaa3d/attachment.html>


More information about the postgis-users mailing list