[postgis-devel] [PostGIS] #701: Support for 9.1 KNN GIST enhancements

PostGIS trac at osgeo.org
Thu Feb 17 12:57:49 PST 2011


#701: Support for 9.1 KNN GIST enhancements
-------------------------+--------------------------------------------------
 Reporter:  robe         |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by nicklas):

 Hmm, If I read this part of the conversation right:
 http://article.gmane.org/gmane.comp.db.postgresql.performance/28905

 ... it is as I have feared. There seems to be no way to use it for
 anything but points.
 If we use it against anything else (except a few exceptions) we will need
 to do a recheck to see if we really have found the closest geometry and
 not only the closest bounding box. But what we can get from the KNN gist
 index is an ordered list. The number of items in the list we have to tell
 beforehand. We can not come back from our recheck and say, We have reasons
 to believe that there still might be some candidate out there for being
 closest, give us some more.

 To decide if we really know if we have the closest is no problem if we
 have found a real mindistance (between the actual geometries, not the
 bboxes) that is closer than the next bbox in the ordered list.

 The problem is if the last bbox is closer than the rechecked closest, the
 we don't know if the next one (outside our limit) in the ordered list is a
 candidate.

 Does it make sense.

 I think that is very bad news, but maybe there is some way to find a
 workaround.

 /Nicklas

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/701#comment:3>
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-devel mailing list