[postgis-users] out of memory when using simplify

strk at refractions.net strk at refractions.net
Wed Sep 29 08:23:37 PDT 2004


On Wed, Sep 29, 2004 at 10:15:26AM -0500, John Cole wrote:
> Hello,
>   I'm trying to do some processing on a roads layer and simplify it for
> rendering speed.  In ArcInfo, I would use a dissolve on the hwy_num field
> and then simplify it to 500 meters.
>  
>   From the documentation, PostGIS seems like it can do the same thing, first
> selecting into a new table using either the GeomUnion or Collect aggregates
> and then again using simplify, however using simplify returns the following
> error:
>  
> ERROR:  out of memory
> DETAIL:  Failed on request of size 4172712.

I suggest you first simplify and then collect.

>  
> here is my query:
>     select hwy_num, simplify(the_geom, 500) as the_geom from ra1bb
>  
> where ra1bb is created from:
>     select hwy_num, geomunion(the_geom) as the_geom into ra1bb from ra1
> group by hwy_num
>  
> Another question:  what is the difference between collect and geomunion
> (besides speed)?  Which one would better approximate an ArcInfo dissolve
> function?

geomunion implements a spatial union: two overlapping areas become
a single area.
collect just keeps the whole pointset making a GEOMETRYCOLLECTION
(or a simpler type if applicable).

--strk;


 
>  
> Thanks,
>  
> John Cole
> 



More information about the postgis-users mailing list