Search code examples
google-app-enginegoogle-cloud-storagegoogle-cloud-endpoints

In Google Cloud Endpoints, how is it possible to query the nearest points to a given coordinate?


In MongoDB for a coordinate (lat, lng), we can describe a circle of radius R around it and determine which points are inside this circle using centerSphere method.

Withoud using MongoDB, is it possible to efficiently query those points using only Google Cloud DataStore API?


Solution

  • Consider using the AppEngine Search service. You need to index your content into 'documents' first but then you can use a geopoint query to find the appropriate data. https://cloud.google.com/appengine/docs/java/search/query_strings#Java_Queries_on_geopoint_fields