Ranjeet,

I don't think you can do a radius search with GQL, unless they've added 
functionality since I was building code for doing spatial queries a couple 
of years ago. I wound up using the Geo Hash technique which doesn't provide 
a radius search but does let you search in bounding rectangles.  It reduces 
a lat/lon down to a hash value, and you can strip bytes off the right side 
of the hash to search by increasingly larger bounding rectangles.  It was 
the best solution I could find that works with the limitations of the GAE 
database.

Another option that might be available for you to use soon is the new Cloud 
SQL service.  It currently uses MySQL 5.5, but as soon as they upgrade to 
5.6.x you'll be able to use the ST_CONTAINS functions (and other ST_ geo 
functions) in your queries which will do proper spatial queries.  Until 
then the CONTAINS function just does a bounding box search.

Jim



On Wednesday, August 28, 2013 7:26:19 AM UTC-5, Ranjeet sengar wrote:
>
> Hi,
> Im developing my first application on app engine and first post here, so 
> please be gentle :)
>
> Im developing an application where I store location information in the 
> datastore.Im trying to fetch all the points (lat,long) within a specified 
> radius of a given point.
> Similar to this 
> stackoverflow<http://stackoverflow.com/questions/2411528/query-points-within-a-given-radius-in-mysql>
>  question 
> on SQL. I would like to know if the same can be achieved with gql. (similar 
> to http://www.movable-type.co.uk/scripts/latlong-db.html)
>
> Looking forward to your suggestions,
>
> Thanks.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to