I would call it geonormalizing, instead of thinking of it as a form of
geohashing.  Basically, geohashing tells you where your point is with
relation to anywhere else on the grid; this tells you where you are in
relation only to your immediate neighbors, where those neighborhoods
are defined at object creation time.

I haven't gotten as far as looking at zoom ranges.  At the moment, I
figure I'll just keep it so that you can search in a particular range,
and if you're zooming in or out, it just keeps the display of the
objects it pulled from the original search.

-Ben ("readyassist"... I hate the way they truncate my email address!)

On Sep 9, 12:48 am, "José Oliver Segura" <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 9, 2008 at 8:57 AM, [EMAIL PROTECTED]
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > I've got a better solution than geohashing.
>
> > I break down the grid into sub-degree squares by truncating after the
> > first decimal point, and then when I save something that I need to
> > find on the map later, I save metadata with that point indicating the
> > surrounding grid squares.
>
> > So if I have a point with long -122.123123123 and lat 35.56565, that's
> > in a grid square called -122.1x35.5, and it's surrounded as follows:
>
> > [-122.2x35.6][-122.1x35.6][-122.0x35.6]
> > [-122.2x35.5][-122.1x35.5][-122.0x35.5]
> > [-122.2x35.4][-122.1x35.4][-122.0x35.4]
>
> > Those are all represented in my object as a list
> > (db.StringListProperty, so you have to do the right permutations to
> > make them into strings), and because of the way lists work, if a point
> > that you're searching on is in any of the grid squares associated with
> > a saved point, that saved point will come up.
>
> > To wit, if you have saved that above point, and someone comes in
> > searching on an address that corresponds to LONG -122.0857 LAT
> > 35.69999, that corresponds to grid square '-122.0x35.6', which is in
> > your upper right hand corner.  Thus, if you search for something like:
>
> > square = '-122.0x35.6'
> > points = (SELECT * FROM Locations WHERE gridList=:1", square)
>
> > ...you'll find that the original point we saved above will return.
>
> > It's all about metadata.  Don't think in terms of inequalities and
> > boundary conditions, think in terms of inclusive ranges.
>
> > Best,
>
> > Ben
>
> Interesting, basically a different approach to geohash (I believe).
>
> However... how does your solution deal with zoom ranges?
>
> Best,
> Jose
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to