<div dir="ltr">Are we 100% sure this is a float/double issue? The distance between two float boxes should always be *smaller* than the actual distance between two objects, since the float box extrema are always moved *away* from the original object when the float boxes are created. So from a "theoretical mechanics" perspective this shouldn't actually be the source of the problem.<div><br></div><div>From a real world point-of-view, how could it still be the problem?</div><div>- maybe the box generation code has a short circuit for points which doesn't do the correct thing? Pretty sure it doesn't, but.</div><div>- something else?<br><br>P<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 3, 2017 at 4:54 AM, Regina Obe <span dir="ltr"><<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
>> Anyrate if there is nothing that can be done about ensuring index<br>
>> distance is always less or equal to actual distance<br>
<br>
> I remember we were all happy about having *real* distance with a more recent PostgreSQL. If that's not the case (as the user reports) we should try to find a way to provide both mechanisms.<br>
> Two different operators, maybe ?<br>
> --strk;<br>
<br>
</span>We've already got two different operators.  We have <#> which doesn't use recheck and that's what I told the user to use, until we resolve this.<br>
<br>
The thing is the <-> I think pretty much for all reasonable purposes returns the right order for points (and in fact in this case yields the same value and <-> I think in all cases it will).<br>
<br>
So it's just the float4/float8 mess why it screws up and it Errors noisily in PostgreSQL land where we cannot control.<br>
<br>
I hate telling people to if you have point / point use <#> and if you have others you can safely use  <->.  That's sooo unfriendly.<br>
<br>
I think the best thing is just to not have point-point checks use recheck.  Can we do that easily? That's what PostgreSQL point/point does.<br>
That way we don't fall into the PostgreSQL box trap of<br>
<br>
"Hey -- how come your index distance is bigger than your computed distance.  What kind of monster are you? Screw you!"<br>
<br>
Thanks,<br>
Regina<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a></div></div></blockquote></div><br></div>