Hello,

I am trying to use the Date Range Recipe [1] in the App Engine
Cookbook, to find bounding boxes containing a particular point.

The method used in the recipe allows searching for events occurring on
particular days by storing the event start and end dates in a list
(date_range).

This allows the query:
 ... WHERE date_range >= :1 AND date_range <= :1, date_in_question)
to work because [2] "In a query, comparing a list property to a value
performs the test against the list members: ... list_property < value
tests if any of the members of the list are less than the given value,
and so forth."

I have taken the same method and used it for geohashes. In my case I
have many suppliers who deliver to geographical areas. These areas
overlap and are not exclusive.
I have stored the delivery areas using a bounding box defined by two
geohases, one for the NE point and one for the SW point:

delivery_area = [NEhash, SWhash]

When searching, I geohash the search position, then search in the
list, as in the recipe:

searchpositionhash = geohash.encode
(searchpositionlat,searchpositionlon)
sellers_who_deliver = db.GqlQuery("SELECT * FROM Sellers WHERE
delivery_area <= :1 AND delivery_area >= :1, searchpositionhash )

This works without any problems in the SDK, but no responses are
returned in the production environment. Understandably it is
frustrating when the SDK works differently from the production server,
but my frustration is compounded by my inability to find any posts
showing similar problems.

Has anyone used lists of geohashes to define bounding boxes, if so
what was your experience of searching?
Can anyone see anything wrong with the method I am using?
Finally, if there is a simpler method of finding bounding boxes,
matching a point please, please, please, kick me in the right
direction!

Thanks,

David

[1] http://appengine-cookbook.appspot.com/recipe/how-to-query-by-date-range/
[2] 
http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#ListProperty

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to