[postgis-tickets] [PostGIS] #2556: geography ST_Intersects results depending on insert order
PostGIS
trac at osgeo.org
Sun Feb 2 07:04:19 PST 2014
#2556: geography ST_Intersects results depending on insert order
--------------------------------------------------+-------------------------
Reporter: gekorob | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.1.2
Component: postgis | Version: 2.1.x
Keywords: st_intersects intersection geography |
--------------------------------------------------+-------------------------
Comment(by robe):
I suspected as much from the numbers. Not sure where in the code it's
doing it, but it seems the cached distance is returning the boundary
distance rather than polygonal distance. I recall somewhere in code
seeing -- this is a polygon use line tree algorithm. Can't remember where
that was but I thought it a bit odd and thought there must be a switch
somewhere else when computing to do area check but couldn't find it.
{{{
SELECT id , r, ST_Distance(condition_geo,geog) As cached_dist
, _ST_DistanceUncached(condition_geo,geog) As uncached_dist,--
_ST_DistanceTree(condition_geo,geog),
_ST_DistanceUncached(condition_geo,ST_Boundary(geog::geometry)::geography)
As bound_dist
from test_cache CROSS JOIN
(SELECT 10*(1 + i*0.0001) As r, ST_Buffer(ST_GeogFromText('POINT(20.0
30.0)'), 10*(1 + i*0.0001)) As geog
FROM generate_series(320,324,1) As i) As foo
WHERE id = 1;
id | r | cached_dist | uncached_dist | bound_dist
----+---------+-------------+---------------+-------------------
1 | 10.3200 | 0 | 0 | 0.318550091945215
1 | 10.3210 | 0.31954556 | 0 | 0.31954556026922
1 | 10.3220 | 0.320541029 | 0 | 0.320541029428955
1 | 10.3230 | 0.321536499 | 0 | 0.321536499026094
1 | 10.3240 | 0.322531967 | 0 | 0.32253196740571
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2556#comment:8>
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