[postgis-users] connection terminated with buffer(0.0)

Andreas Laggner andreas.laggner at fal.de
Wed Aug 29 07:41:23 PDT 2007


Moin Stefan,

i am running the buffer (0.0) to repair invalid polygons, for sure i 
have invalid polygons than ;-)
But all of them are SIMPLE, all are CLOSED and none is EMPTY. With 
ISRING i get back an error:
ERROR: isring() should only be called on a LINE
And that?s curious - because i should not have linestring in that 
dataset.....
I could not find out what your solution was. To built the test table and 
see which polygon causes the error? But that did not work, because my 
SQL-Version is doing an automatic rollback if the operation is not 
finished regulary.
So....what to do?

Cheers Andreas


Stefan Zweig schrieb:
> hi andreas,
>
> recently i had a similar problem. i figured out, that the actual reason was that the buffer(the_geom,0) function seems to crash on polygons which are not closed, i.e. first point != last point, even if only one polygon or one part of a multipolygon is such a not closed on. so it might help you to check whether all the polygons are closed / valid in this the_geom column.
>
> stefan
>
> refer to my postings from august to
>
> An I/O error occured while sending to the backend
> and
> how to polygonize a not closed linestring?
>
>
>   
>> -----Ursprüngliche Nachricht-----
>> Von: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>> Gesendet: 28.08.07 17:17:11
>> An: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>> Betreff: Re: [postgis-users] connection terminated with buffer(0.0)
>>     
>
>
>   
>> Figure out which geometry is the problem one so (a) you can work  
>> around it and (b) you can attach it to a bug report and (c) we can  
>> eventually fix it.
>>
>> Worst case scenario, binary search by repeatedly cutting your input  
>> data set in half.
>>
>> P
>>
>> On 28-Aug-07, at 5:16 AM, Andreas Laggner wrote:
>>
>>     
>>> Hello,
>>>
>>> i used buffer(the_geom, 0.0) several times to repair geometry and  
>>> it works good. But now i have a dataset, where problems occur: Any  
>>> time i try to repair with buffer the connection to postgresql is  
>>> terminated. It seems to relate to one (or more) bad geometry. What  
>>> can i do now?
>>>
>>> My statement (the most simple one without attributes to minimize  
>>> possible sources for errors):
>>>
>>> create table gemeinden_rep();
>>> select addgeometrycolumn 
>>> ('','gemeinden_rep','the_geom','31467','MULTIPOLYGON',2);
>>> alter table gemeinden_rep drop constraint enforce_geotype_the_geom;
>>> insert into gemeinden_rep
>>>    select buffer(the_geom, 0.0)
>>>    from gemeinden;
>>>
>>>
>>> Thanks      Andreas
>>>
>>>
>>>
>>> -- 
>>>
>>> Dipl. Geoökologe Andreas Laggner
>>> Institut für Ländliche Räume (LR)
>>> Bundesforschungsanstalt für Landwirtschaft (FAL)
>>>
>>> Institute of Rural Studies
>>> Federal Agricultural Research Centre (FAL)
>>>
>>> Bundesallee 50
>>> D-38116 Braunschweig
>>>
>>> Tel.: (+49) (0)531 596 5515
>>> Fax: (+49) (0)531 596 5599
>>> E-mail: andreas.laggner at fal.de
>>> Homepage: http://www.lr.fal.de/
>>> _______________________________________________
>>> postgis-users mailing list
>>> 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
>>
>>     
>
>
> _________________________________________________________________________
> In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten! 
> Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>   


-- 
Dipl. Geoökologe Andreas Laggner
Institut für Ländliche Räume (LR)
Bundesforschungsanstalt für Landwirtschaft (FAL)

Institute of Rural Studies
Federal Agricultural Research Centre (FAL)

Bundesallee 50
D-38116 Braunschweig

Tel.: (+49) (0)531 596 5515
Fax: (+49) (0)531 596 5599
E-mail: andreas.laggner at fal.de
Homepage: http://www.lr.fal.de/ 




More information about the postgis-users mailing list