[wp-hackers] Geodata storage
Dougal Campbell
dougal at gunters.org
Wed Jun 9 13:35:17 UTC 2010
On Jun 9 2010 9:31 AM, Otto wrote:
> On Wed, Jun 9, 2010 at 8:16 AM, Dougal Campbell<dougal at gunters.org> wrote:
>
>> First of all, having a standard for geodata will be great. I've always been
>> interested in geolocation apps, even if I don't do all that much with it in
>> practice. I'm curious why you decided to store the lat and long values in
>> separate entries? Seems like it would be extremely rare that you'd need one
>> value without the other. I think a "lat, long" pair would be convenient,
>> storage wise, even though you'd have to parse it out later.
>>
> If you're searching for posts based on location, you'll want them
> separate so as to make use of SQL comparisons. WHERE latitude is
> between X and Y, sort of thing.
>
>
Good point, I didn't think about using BETWEEN to limit the searches.
That would be a quick way to find matches within a rectangular area. And
like I said, if you combine them, you'd still have to decouple them for
usage later. So nevermind on that :)
--
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