<div dir="ltr">Points on infinite distance are still on the extended R2+ plane. The empty points aren't. <br><br>This one should be "always false", and make sure that "POINT(INF INF)" is at INF distance from anything (can be true). POINT(Inf Inf) != POINT(NaN NaN) in this aspect.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 4, 2021 at 6:50 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="https://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry" rel="noreferrer" target="_blank">https://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry</a><br>
<br>
<br>
pramsey=# select st_distance('POINT(1 1)','POINT EMPTY');<br>
st_distance <br>
-------------<br>
<br>
(1 row)<br>
<br>
Interesting note in the wiki about returning NULL for DWithin. <br>
<br>
Current behaviour.<br>
<br>
pramsey=# select st_dwithin('POINT(1 1)','POINT EMPTY', 1);<br>
st_dwithin <br>
------------<br>
f<br>
(1 row)<br>
<br>
pramsey=# select st_dwithin('POINT(1 1)','POINT EMPTY', 'Inf'::float8);<br>
st_dwithin <br>
------------<br>
t<br>
(1 row)<br>
<br>
I could see going for "always false" since we're almost there for non-inf values.<br>
<br>
P<br>
<br>
> On Oct 4, 2021, at 8:08 AM, Sandro Santilli <<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>> wrote:<br>
> <br>
> On Mon, Oct 04, 2021 at 05:02:24PM +0200, Sandro Santilli wrote:<br>
>> I'd think yes, honestly, but the current code returns TRUE sometimes,<br>
>> particularly for MAXDISTANCE being Infinite...<br>
>> <br>
>> As I think GEOS is not being used by phylosophers, I can't find any<br>
>> reason why would anyone want a TRUE result from a DistanceWithin()<br>
>> query involving an EMPTY geometry.<br>
> <br>
> We have the same issue on PostGIS:<br>
> <a href="https://trac.osgeo.org/postgis/ticket/5008" rel="noreferrer" target="_blank">https://trac.osgeo.org/postgis/ticket/5008</a><br>
> <br>
> --strk;<br>
> _______________________________________________<br>
> geos-devel mailing list<br>
> <a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</blockquote></div>