[postgis-users] out of memory when using simplify

John Cole john.cole at uai.com
Mon Oct 4 12:49:01 PDT 2004


Thanks for the reply.  I've simplified my layer to 500m first and then did
the geomunion and collect to compare them.  Both result in the same number
of rows, but have different numbers of geometries (with the GeomUnion being
slightly simpler).  The Collect takes ~3 seconds while the GeomUnion takes
over 5 hours.

In either case, you cannot run a simplify on the resulting table without
getting the out of memory error.  I'd like to reduce the number points in
each record to speed up drawing.  Is there a way to take a multilinestring
and turn it into a single linestring?  I'm hoping that the simplify will
work on a single linestring object instead of the large mulitlinestrings I
have now.

Thanks,

John Cole

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
strk at refractions.net
Sent: Wednesday, September 29, 2004 10:24 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] out of memory when using simplify


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
> 
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------------------------------
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the postgis-users mailing list