[Xapian-tickets] [Xapian] #481: Merge geospatial branch

Xapian nobody at xapian.org
Tue Jun 8 15:58:09 BST 2010


#481: Merge geospatial branch
-------------------------+--------------------------------------------------
 Reporter:  richard      |       Owner:  richard  
     Type:  enhancement  |      Status:  assigned 
 Priority:  normal       |   Milestone:  1.2.1    
Component:  Library API  |     Version:  SVN trunk
 Severity:  normal       |    Keywords:           
Blockedby:               |    Platform:  All      
 Blocking:               |  
-------------------------+--------------------------------------------------

Comment(by richard):

 An alternative approach would be to get rid of {{{LatLongCoords}}}
 altogether.  Instead, {{{LatLongMetric}}} would take a set of coordinates
 in serialised form.  To store multiple coordinates in a slot, users would
 simply append serialised coordinates together (which is what
 {{{LatLongCoords}}} currently does).

 Also, most of the time one of the coordinates supplied to
 {{{LatLongMetric}}} is a "center" coordinate, and is fixed for the
 duration of a query.  If that was supplied to the metric (at construction
 time, or shortly after that), the metric might be able to optimise
 calculations for that center (by building bounding boxes of interest,
 etc).  So perhaps we want metrics which have a distance calculation method
 which takes a single coordinate, and returns the distance from the stored
 center.

 I think we'd want to preserve the ability of {{{LatLongMetric}}} to
 calculate a pointwise distance based on a pair of {{{LatLongCoord}}}
 objects, though: future code to generate acceleration terms (like that on
 the geospatial branch) needs to do such calculations frequently.

 On a related note, the {{{LatLongCoord::unserialise(const char ** ptr,
 const char * end)}}} method can't currently be used from the bindings,
 since the {{{const char ** ptr}}} type can't be created there.  I think
 this probably needs special wrapping, to return a list of the coordinates.

-- 
Ticket URL: <http://trac.xapian.org/ticket/481#comment:10>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list