[wp-hackers] Geodata storage

Dougal Campbell dougal at gunters.org
Wed Jun 9 13:31:50 UTC 2010


On Jun 5 2010 4:30 PM, Mike Schinkel wrote:
> On Jun 5, 2010, at 4:27 PM, Beau Lebens wrote:
>    
>> Also having this data allows you to do things like search for all
>> posts in an area.
>>      
> How ironic.  I'm working on a project that needs exactly that (now why wasn't that obvious for me? Doh!)
>
> That brings up a great question.  Is there a standard way to generate post search results ranked in order of location from a central geo-point?  (if not, should there be?)
>    

There are Spatial Extensions in MySQL:

   http://dev.mysql.com/doc/refman/4.1/en/spatial-extensions.html

There are functions for determining distance, or whether a point is 
within a boundry area (among other things). It's also possible to add 
spatial datatypes as fields on a table and to have spatial indexes. 
That's not really applicable to the metadata directly used by WP, but 
might be useful if you wanted to create a separate lookup table linked 
back to standard WP objects (posts, users, comments).


-- 
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/
http://twitter.com/dougal
http://twitual.com/


More information about the wp-hackers mailing list