[postgis-users] problem with st_collect()

Kevin Neufeld kneufeld at refractions.net
Thu Aug 20 11:35:12 PDT 2009


Ah.  How are you viewing the table?  Spatially though a GIS application, a psql terminal client, or just through 
PgAdminIII?  PgAdmin has issues displaying fields over a certain size.
-- Kevin

Marc-André Trottier wrote:
> ok thanks for the advise.
> finally i got a result but the field 'the_geom' is blank in my table.
> i calculate the size of the geometry with st_mem_size() and when the 
> geometry is bigger than 32000 bytes, approximately, the field 'the_geom' 
> is blank but there is a geometry.
> 
> 
> Marc-André
> 
> 2009/8/20 Kevin Neufeld <kneufeld at refractions.net 
> <mailto:kneufeld at refractions.net>>
> 
>     Be careful with ST_Collect.   As the name implies, it will collect
>     all the geometries in the set into a single geometry object.   If
>     your table is gigabytes in size, running over the whole table will
>     create a single geometry collection that is gigabytes in size ...
>     which in all likelihood is really rather useless in any GIS
>     application and will probably overwhelm your postgresql instance.
> 
>     ST_Collects is definitely useful, but just be sure you really want a
>     single (potentially very large and clumsy) geometry object.
> 
>     -- Kevin
> 
>     Marc-André Trottier wrote:
> 
>         hi!
>         i have a problem with this request :
>         select st_collect(geometryN(setsrid(the_geom, 32198),1)) from
>         'table_name';
> 
>         this will return no results if "the_geom" contain  too much rows
>         or "the_geom" are too complex.
>         How can i solve this problem ?
> 
>         thanks
> 
>         Marc-andré
>          
> 
>         ------------------------------------------------------------------------
> 
>         _______________________________________________
>         postgis-users mailing list
>         postgis-users at postgis.refractions.net
>         <mailto:postgis-users at postgis.refractions.net>
>         http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
>     _______________________________________________
>     postgis-users mailing list
>     postgis-users at postgis.refractions.net
>     <mailto:postgis-users at postgis.refractions.net>
>     http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list