Points on infinite distance are still on the extended R2+ plane. The empty points aren't.
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. On Mon, Oct 4, 2021 at 6:50 PM Paul Ramsey <pram...@cleverelephant.ca> wrote: > https://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry > > > pramsey=# select st_distance('POINT(1 1)','POINT EMPTY'); > st_distance > ------------- > > (1 row) > > Interesting note in the wiki about returning NULL for DWithin. > > Current behaviour. > > pramsey=# select st_dwithin('POINT(1 1)','POINT EMPTY', 1); > st_dwithin > ------------ > f > (1 row) > > pramsey=# select st_dwithin('POINT(1 1)','POINT EMPTY', 'Inf'::float8); > st_dwithin > ------------ > t > (1 row) > > I could see going for "always false" since we're almost there for non-inf > values. > > P > > > On Oct 4, 2021, at 8:08 AM, Sandro Santilli <s...@kbt.io> wrote: > > > > On Mon, Oct 04, 2021 at 05:02:24PM +0200, Sandro Santilli wrote: > >> I'd think yes, honestly, but the current code returns TRUE sometimes, > >> particularly for MAXDISTANCE being Infinite... > >> > >> As I think GEOS is not being used by phylosophers, I can't find any > >> reason why would anyone want a TRUE result from a DistanceWithin() > >> query involving an EMPTY geometry. > > > > We have the same issue on PostGIS: > > https://trac.osgeo.org/postgis/ticket/5008 > > > > --strk; > > _______________________________________________ > > geos-devel mailing list > > geos-devel@lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/geos-devel > > _______________________________________________ > geos-devel mailing list > geos-devel@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/geos-devel >
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel