[postgis-users] Re: Re: Errors in geometry. (TECHER David)

Jennehag Åke Ake.Jennehag at lm.se
Tue Apr 17 04:18:17 PDT 2007


Hi!

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.


....
NOTICE:  Too few points in geometry component
NOTICE:  Self-intersection
NOTICE:  Self-intersection
....

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.

If I try this query:

SELECT gid , asgml(geom) FROM bishkekeni WHERE gid < 500; 

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 ....

Regards

Åke Jennehag

 

>Date: Mon, 16 Apr 2007 20:17:33 +0200

>From: TECHER David <davidtecher at yahoo.fr>

>Subject: Re: [postgis-users] Errors in geometry.

>To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>

>Message-ID: <4623BDBD.3020708 at yahoo.fr>

>Content-Type: text/plain; charset=ISO-8859-1; format=flowed

>Perhaps by adding a column

>ALTER TABLE .. ADD COLUMN is_valid boolean;

>UPDATE ... SET is_valid=isvalid(the_geom)

>then

>SELECT gid, asgml(geom) FROM bishkekeni WHERE NOT is_valid = ...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070417/7ec9aa6d/attachment.html>


More information about the postgis-users mailing list