[Xapian-discuss] Can xapian do geo search/calculations?

Richard Boulton richard at lemurconsulting.com
Mon Aug 4 09:50:20 BST 2008


Olly Betts wrote:
> On Mon, Aug 04, 2008 at 01:16:04AM -0700, Joe Noon wrote:
>> I would be interested in exploring xapian further, but I'm not sure if
>> I can get this functionality or not.  Ive been told it may be possible
>> with a a value range processor? Is this something anyone else has
>> already explored? Or know if it would even be possible?
> 
> You could filter with two value ranges to get results restricted to a
> rectangle in the coordinate system (which is in general not quite a
> rectangle on the ground).
> 
> To actually get a circle, you'd want to use a MatchDecider subclass
> to select points based on coordinates stored in one or two document
> values.  It would probably be useful to ship a standard solution, so if
> you implement something please consider sending a patch, even if it
> needs a bit of work for general use.
> 
> There's also some code Richard has been working on in the geospatial
> branch in SVN, but he's better placed to talk about that:
> 
> http://trac.xapian.org/browser/branches/geospatial

IIRC, the work I've done roughly does what Olly describes with a 
MatchDecider.  It also uses what's called a Heirarchical Triangular Mesh 
algorithm to assign groups of points to sets of triangles of different 
sizes on the worlds surface - this allows a fast "pre-search" to be used 
to calculate the approximate set of results, and the MatchDecider to be 
used to make that pre-search into an exact search.

However, it's not finished and not yet useable.  It got put on hold a 
while ago - the branch is quite far behind trunk now - I'll try and find 
some time soon to update it, and to describe the current state of the code.

-- 
Richard



More information about the Xapian-discuss mailing list