[postgis-tickets] [PostGIS] #2422: geography regression difference ST_DWithin
PostGIS
trac at osgeo.org
Sat Oct 19 17:16:10 PDT 2013
#2422: geography regression difference ST_DWithin
---------------------+------------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.1.1
Component: postgis | Version: 2.1.x
Keywords: |
---------------------+------------------------------------------------------
Comment(by robe):
actually never mind the geometry collection bit (its a mix of polygons and
geometry collections). If my 2 geometries that failed this
{{{
SELECT gid, geog FROM face
WHERE NOT _ST_DWithin(geog, st_setsrid(st_makepoint(-71.0636, 42.3584),
4326)::geography, 1609.344,true )
AND _ST_DWithinUnCached(geog, st_setsrid(st_makepoint(-71.0636, 42.3584),
4326)::geography, 1609.344 )
}}}
and create a smaller only 2 row table with it. Then only one fails this
time but putting the check in the from yield2 true so definitely seems
like a caching bug of sorts.
{{{
SELECT gid, geog, _ST_DWithin(geog, st_setsrid(st_makepoint(-71.0636,
42.3584), 4326)::geography, 1609.344,true ) FROM face2
WHERE NOT _ST_DWithin(geog, st_setsrid(st_makepoint(-71.0636, 42.3584),
4326)::geography, 1609.344,true )
AND _ST_DWithinUnCached(geog, st_setsrid(st_makepoint(-71.0636, 42.3584),
4326)::geography, 1609.344 )
}}}
Yields:
{{{
gid | _st_dwithin
----+-------------
2 | t
}}}
{{{
SELECT gid, _ST_DWithin(geog, st_setsrid(st_makepoint(-71.0636, 42.3584),
4326)::geography, 1609.344,true )
, ST_Distance(geog, st_setsrid(st_makepoint(-71.0636, 42.3584),
4326)::geography )
FROM face2;
gid | _st_dwithin | st_distance
-----+-------------+----------------
1 | t | 1398.407057514
2 | f | 1001.9245264
}}}
Berry berry interesting. What's kinda bizarre to me is both records ARE
within distance so even caching wise, how could it ever have a cache that
has false in it.
I still need to upgrade this db to test again. This is running with
released 2.1.0
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2422#comment:23>
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