<!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. But it wont help me. I want to get the type off error as it
is 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: Too few points in geometry
component<BR></SPAN></FONT><FONT face=Courier size=2><SPAN
class=239571710-17042007>NOTICE: Self-intersection<BR>NOTICE:
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 < 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 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> </P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>></SPAN>Date:
Mon, 16 Apr 2007 20:17:33 +0200</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>></SPAN>From:
TECHER David <davidtecher@yahoo.fr></FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=239571710-17042007>></SPAN>Subject: Re: [postgis-users] Errors in
geometry.</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>></SPAN>To:
PostGIS Users Discussion
<postgis-users@postgis.refractions.net></FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=239571710-17042007>></SPAN>Message-ID:
<4623BDBD.3020708@yahoo.fr></FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=239571710-17042007>></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>></SPAN>Perhaps by adding a column</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN class=239571710-17042007>></SPAN>ALTER
TABLE .. ADD COLUMN is_valid boolean;</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=239571710-17042007>></SPAN>UPDATE ... SET
is_valid=isvalid(the_geom)</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=239571710-17042007>></SPAN>then</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=239571710-17042007>></SPAN>SELECT gid, asgml(geom) FROM bishkekeni
WHERE NOT is_valid = ...</FONT></FONT></P></DIV></BODY></HTML>