<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV>
<P><FONT face=Courier size=2><SPAN 
class=239571710-17042007>Hi!</SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN class=239571710-17042007>Thanks for the 
reply.&nbsp;But it wont help me. I want to get the type off error as it 
is&nbsp;printed out in the message window. isvalid(geom) function only reports 
back true or false (true if the geom is ok and false if it has any problem.) I 
want to know what the problem is with the geometry. Apparently there is some way 
to report this, otherwise I don't know there the messages (see below) comes 
from. I'm actually looking for the function that prints out the error. I have 
search the documentation for this but I have not found 
anything.</SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN 
class=239571710-17042007><BR>....<BR>NOTICE:&nbsp; Too few points in geometry 
component<BR></SPAN></FONT><FONT face=Courier size=2><SPAN 
class=239571710-17042007>NOTICE:&nbsp; Self-intersection<BR>NOTICE:&nbsp; 
Self-intersection<BR>....</SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN class=239571710-17042007>It seams that each 
error that are reported back with the isvalid(geom) function has an description 
in the message window, but I'm not sure.</SPAN></FONT></P>
<P><FONT size=2><SPAN class=239571710-17042007></SPAN></FONT><FONT size=2><SPAN 
class=239571710-17042007></SPAN></FONT><FONT face=Courier size=2><SPAN 
class=239571710-17042007>If I try this query:</SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN class=239571710-17042007>SELECT gid , 
asgml(geom) FROM bishkekeni WHERE gid &lt; 500; </SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN class=239571710-17042007>Then I don't get any 
'NOTICE: [error]' in the message window, so it must be connected with the 
isvalid() function. But as I wrote&nbsp;before, I'm interested in knowing what 
is wrong with a particular geometry, is it self-intersecting or 
....</SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN 
class=239571710-17042007>Regards</SPAN></FONT></P>
<P><FONT face=Courier size=2><SPAN class=239571710-17042007>Åke 
Jennehag</SPAN></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007></SPAN></FONT></FONT>&nbsp;</P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>&gt;</SPAN>Date: 
Mon, 16 Apr 2007 20:17:33 +0200</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>&gt;</SPAN>From: 
TECHER David &lt;davidtecher@yahoo.fr&gt;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>Subject: Re: [postgis-users] Errors in 
geometry.</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>&gt;</SPAN>To: 
PostGIS Users Discussion 
&lt;postgis-users@postgis.refractions.net&gt;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>Message-ID: 
&lt;4623BDBD.3020708@yahoo.fr&gt;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>Content-Type: text/plain; 
charset=ISO-8859-1; format=flowed</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>Perhaps by adding a column</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>&gt;</SPAN>ALTER 
TABLE .. ADD COLUMN is_valid boolean;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>UPDATE ... SET 
is_valid=isvalid(the_geom)</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>then</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=239571710-17042007>&gt;</SPAN>SELECT gid, asgml(geom) FROM bishkekeni 
WHERE NOT is_valid = ...</FONT></FONT></P></DIV></BODY></HTML>