[postgis-tickets] [PostGIS] #2556: geography ST_Intersects results depending on insert order
PostGIS
trac at osgeo.org
Sat Feb 1 21:18:02 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 take back what I said about this being different from the issue I posed
in #2422. i think there is something screwy with the
circ_tree_distance_tree (or circ_tree_distance_tree_internal ) function.
When comparing for the above case why the _st_distancetree gives the right
answer while cached_dist is wrong, I discovered that _st_distancetree does
a 2 pronged:
{{{
if ( CircTreePIP(circ_tree1, g1, lwgeom2) || CircTreePIP(circ_tree2, g2,
lwgeom1) )
}}}
CircTreePIP test so since one PIP returns true, it never gets to the
circ_tree_distance for this particular case. If I add another prong to
the geography_distance_cache function, it too returns 0.
I also tried removing the tree_cache use in geography_distance_cache (just
building the tree from scrach in both) similar to what the
geography_distance_tree does, and it still returns the wrong same answer.
So it does seem to be the tree logic here at fault in both bug tickets and
cache is probably fine.
I think that may also explain why for buffer below 10.00 the answer is 0
as expected because the CircTreePIP kicks out before you get the
circ_tree_distance_tree test.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2556#comment:7>
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