[postgis-tickets] [PostGIS] #5095: Unexpected ST_DWithin result when using geography
PostGIS
trac at osgeo.org
Sun Feb 13 23:42:59 PST 2022
#5095: Unexpected ST_DWithin result when using geography
---------------------+---------------------------
Reporter: satoshi | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.3.0
Component: postgis | Version: 3.2.x
Keywords: |
---------------------+---------------------------
Hello,
This query:
{{{
SELECT ST_DWithin(
ST_Buffer('SRID=4326;LINESTRING(7.1670005 45.9968257,7.1670216
45.9969537,7.1670216 45.9971326, 7.1670484 45.9972789, 7.1671905
45.9974074, 7.1672844 45.9974801, 7.1659165 46.0005209, 7.1653103
46.0010221, 7.1652359 46.0013015)'::geography, 1.0),
'SRID=4326;POINT(7.1672844 45.9974801)'::geography,
0.0
);
}}}
Returns `FALSE`. Note that the point that is passed as the second
parameter to `ST_DWithin` is part of the `LINESTRING` passed in the first
parameter, so I expect it to return `TRUE`.
When removing the first or last point from the `LINESTRING`, then it
correctly returns `TRUE`.
When using `geometry` instead of `geography` and using 0.0000105 for the
buffer (which is roughly 1 meter at that latitude), then it correctly
returns `TRUE`.
I think this is a bug?
Thank you,
Dario
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5095>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list