[postgis-users] PostGIS kills all connections to the PostgreSQLserver

Paul Ramsey pramsey at refractions.net
Wed Jul 19 16:26:20 PDT 2006


Simplifying to 1000 meters sounds a bit harsh to me...  is the end
product anything like the right shape (you could have simplified it down
to a triangle or something:) ? And there is a danger that simplifying
might make the geometry invalid (though buffer is relatively tolerant of
such things).

Bruce Rindahl wrote:
> That does it!
> I thought of that also but the documentation says:
> "Will actually do something only with (multi)lines or (multi)polygons.." and
> wrongly assumed it only works on multipolygons.
> The query is now one buffer (any size) and is sub second!
> 
>> SELECT area(buffer(simplify(transform(GeomFromText('POLYGON((....
>> 		......................
>> ......))', 4267), 32039), 1000), 20000); 
> 
> -----Original Message-----
> From: Paul Ramsey [mailto:pramsey at refractions.net] 
> Sent: Wednesday, July 19, 2006 5:06 PM
> To: rindahl at lrcwe.com; PostGIS Users Discussion
> Subject: Re: [postgis-users] PostGIS kills all connections to the
> PostgreSQLserver
> 
> Great sleuthing Bruce!
> 
> I wonder if inserting a simplify() in there at some point would make 
> things even better.
> 
> P
> 
> Bruce Rindahl wrote:
>> My guess as to why this is happening is the shapefile is really poor
> quality
>> with intersections (interior loops etc.)  Where did you get it?  ESRI maps
>> and data CD?
>> The fix is to do multiple buffers.  I tested your query and it ran in 234
>> seconds (20000 buffer).
>> I then ran:
>> SELECT area(buffer(buffer(buffer(transform(GeomFromText('POLYGON((....
>> 		......................
>> ......))', 4267), 32039), 1000), 9000), 10000);
>>
>> and got the same result in 25 seconds.  I think the first buffer in effect
>> cleans out the weird parts of the shape and then the rest are acting on a
>> cleaner shape.   A 60,000 buffer was done in 26 seconds.
>> Hope an order of magnitude helps!
>>
>> Bruce Rindahl
>>
>>
>>
>> _______________________________________________
>> 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