[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] ST_Insersection problem
From:       "G. van Es" <gves2000 () yahoo ! com>
Date:       2011-09-22 18:28:14
Message-ID: 1316716094.671.YahooMailNeo () web161014 ! mail ! bf1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for the advice. I will definitely look into this. For now I'm going to warmup \
a little in Italy for a few days so I will report my findings in two weeks.

Kind regards,

Ge



________________________________
From: Andrea Peri <>
To: PostGIS Users Discussion <postgis-users@postgis.refractions.net>
Sent: Thursday, September 22, 2011 12:02 PM
Subject: Re: [postgis-users] ST_Insersection problem


> Hello Group,
> We are using "POSTGIS="1.5.1" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 \
> September 2009" LIBXML="2.7.6" USE_STATS" and having a problem with \
> ST_Intersection(). Given the following query
> select count(st_intersection(tbl_a.the_geom,tbl_b.the_geom)) from tbl_a, tbl_b;
> will result in this error message
> NOTICE:  TopologyException: found non-noded intersection between LINESTRING \
> (62723.7 426635, 62722.5 426634) and LINESTRING (62723.7 426635, 62726.2 426632) at \
>                 62723.7 426635
> ERROR: GEOS Intersection() threw an error!
> SQL status:XX000
> 
> After the NOTICE message we expect the query to continue but it doesn't.  Both \
> tables have all records st_isvalid='t'. 
> Does anyone know a solution or workaround for this problem?
> 
> Thanks,

Hi,
I give my 2ct. :)
The problemyou report is not really a problem of postgis, but instead is a problem of \
the finite arithmetic use by the pcs and of the methematical algorithm used .

I have every time the error you report.
Please notice I run about 10-20 million records of geometry and some geometry has \
also 1 million vertex :)

Is a nightmare.
But this is the beautiful and the hell of the arithmetic finite .

To resolve this you must detect at every step what happened and filter they using \
specific "where" clause or CASE operators.

Is pretty easy,
you will see often it return a Collection, and you get only the lines or the polys \
from that, again you can filter out the empty geometry.
After this long path you will have a good procedure to clean all the problem of a \
real intersection on a arithmetic finite machine.

Regards,
Andrea Peri.



-- 
-----------------
Andrea Peri
. . . . . . . . . 
qwerty אטלעש
-----------------


_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:verdana, \
helvetica, sans-serif;font-size:10pt"><div><span>Thanks for the advice. I will \
definitely look into this. For now I'm going to warmup a little in Italy for a few \
days so I will report my findings in two \
weeks.</span></div><div><br><span></span></div><div><span>Kind \
regards,</span></div><div><br><span></span></div><div><span>Ge<br></span></div><div><br></div><div \
style="font-family: verdana, helvetica, sans-serif; font-size: 10pt;"><div \
style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font \
face="Arial" size="2"><hr size="1"><b><span \
style="font-weight:bold;">From:</span></b> Andrea Peri &lt;&gt;<br><b><span \
style="font-weight: bold;">To:</span></b> PostGIS Users Discussion \
&lt;postgis-users@postgis.refractions.net&gt;<br><b><span style="font-weight: \
bold;">Sent:</span></b> Thursday, September 22, 2011 12:02 PM<br><b><span \
style="font-weight:  bold;">Subject:</span></b> Re: [postgis-users] ST_Insersection \
problem<br></font><br><div id="yiv1218966095"><pre>&gt;Hello Group,<br>&gt;We are \
using "POSTGIS="1.5.1" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" \
LIBXML="2.7.6" USE_STATS" and having a problem with ST_Intersection().<br> &gt;Given \
the following query<br>&gt;select \
count(st_intersection(tbl_a.the_geom,tbl_b.the_geom)) from tbl_a, tbl_b;<br>&gt;will \
result in this error message<br>&gt;NOTICE:&nbsp; TopologyException: found non-noded \
intersection between LINESTRING (62723.7 426635, 62722.5 426634) and LINESTRING \
(62723.7 426635, 62726.2 426632) at 62723.7 426635<br> &gt;ERROR: GEOS Intersection() \
threw an error!<br>&gt;SQL status:XX000<br>&gt;<br>&gt;After the NOTICE message we \
expect the query to continue but it doesn't.&nbsp; Both tables have all records \
st_isvalid='t'.<br>&gt;<br> &gt;Does anyone know a solution or workaround for this \
problem?<br>&gt;<br>&gt;Thanks,<br><br>Hi,<br>I give my 2ct. :)<br>The problemyou \
report is not really a problem of postgis, but instead is a problem of the finite \
arithmetic use by the pcs and of the methematical algorithm used .<br> <br>I have \
every time the error you report.<br>Please notice I run about 10-20 million records \
of geometry and some geometry has also 1 million vertex :)<br><br>Is a \
nightmare.<br>But this is the beautiful and the hell of the arithmetic finite .<br> \
<br>To resolve this you must detect at every step what happened and filter they using \
specific "where" clause or CASE operators.<br><br>Is pretty easy,<br>you will see \
often it return a Collection, and you get only the lines or the polys from that, \
again<br> you can filter out the empty geometry.<br>After this long path you will \
have a good procedure to clean all the problem of a real intersection on a arithmetic \
finite machine.<br><br>Regards,<br>Andrea Peri.<br><br></pre><br clear="all"> <br>-- \
<br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty \
אטלעש<br>-----------------<br><br> \
</div><br>_______________________________________________<br>postgis-users mailing \
list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" \
href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users" \
target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br><br></div></div></div></body></html>




_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic