Bump. It surprises me that no-one has any comments on this, based on the number of other threads discussing geohashes. In summary there are two issues here. 1. SDK and GAE do different things; any comments? 2. Does anyone have a robust method for finding bounding boxes containing a point?
Thanks, and apologies for the bump but this has me stumped. David On Apr 12, 6:21 pm, JDT <john.david....@googlemail.com> wrote: > 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/typesandproper... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---