<div dir="ltr">Hey,<div>at first sight it seems to work =)</div><div>Yet I don't know how to be sure of it.</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">"for example : <a href="http://hpics.li/ccf7b74" target="_blank">http://hpics.li/ccf7b74</a> </div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px">(we construct 2 points at double_precision/2 distance on perpendicular line. If the 2 points have different side OR at least one is on line, we say the point is on the line).<br>
I'm not sure about this though because I don't know how the perpendicular construction will react in bad cases, I'll test this this in few hours."</div></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">still need some care, and i'm afraid my c code is very far from efficient (or even nice).</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">What could be a testing strategy?</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">_I intend to test st_intersects vs the result of "st_closestpoint" and  "ST_Line_Interpolate_Point", the test being that it should always intersect.</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px">_I can try to generate maybe 300*300 points at the geometry precision limit and try to see which one are on the line.</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">_as the change is small, maybe we can see if this passes the usual st_intersect test?</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">I'm full of good will but with rusty C skills.</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px">Cheers,</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">Rémi-C</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/11/8 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fri, Nov 08, 2013 at 01:01:56PM +0100, Rémi Cura wrote:<br>
<br>
> "Are you saying you have a point and a line and you can mathematically<br>
> prove that the point is on the line while GEOS says otherwise ?"<br>
> Yep, it's all the problem ! in fact according to geos (st_intersect) lines<br>
> have *very* few points, and some line have no points except extremities !<br>
<br>
</div>You mean they have no _representable_ points.<br>
You're right you can mathematically represent them,<br>
only not in floating point notation.<br>
<div class="im"><br>
> AS I said the<br>
> spacing of the point found bi st_intersects seems to follow the<br>
> prime decomposition of the slope (or 1/slope) of the segment. Problem<br>
> occurs when slope is not a finite number.<br>
><br>
> The whole problem comes from using exact math formula with inexact<br>
> computations means. This has been somehow tackled by using a "robust"<br>
> determinant sign, unfortunately this robustness is about saying left or<br>
> right.<br>
><br>
> :-) Thanks for the typs about DEBUG, I'll try to find this , and also the<br>
> place where postgres store it's log.<br>
><br>
> Many thanks for your patience with a beginner like me ^^<br>
<br>
</div>Thank you for going deep into this !<br>
<div class="HOEnZb"><div class="h5"><br>
--strk;<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</div></div></blockquote></div><br></div>