Very basic query I want to run on a GeoPt property.
Basically I'm storing an entity with a GeoPt property and would like users to be able to retrieve entities that have a value in said GeoPt property within a bounding box from a given GeoPt. Simple example of this would be a list of Restaurant entities that a user could query and retrieve a list of Restaurant entities within 1km of their current location. I'm familiar with the concept of Geohashing http://en.wikipedia.org/wiki/Geohash and have seen the 24 hours in San Fran sample that uses a different technique http://code.google.com/appengine/articles/geosearch.html. I'm also familiar with the fact that only one property in a GAE Datastore query can have an inequality filter applied to it but can I apply multiple filters to one property? Is the following query valid? SELECT * FROM Restaurant WHERE Restaurant.Location.Lattitude > (user_lat - d) AND Restaurant.Location.Lattitude < (user_lat + d) AND Restaurant.Location.Longitude > (user_lon - d) AND Restaurant.Location.Longitude < (user_lon + d); This example is similar to the example of a query that won't work in GAE that I saw on the 24 hours in San Fran sample but why can't it work? I'm only running inequality on one property -> Restaurant.Location. Does Restaurant.Location.Latitude count as one property? Thanks for you help in advance, Matt -- 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.
