title: How to query for items near a gps location in dynamodb?
body: <p>if I have documents in an AWS Dynamodb database which contain latitude and longitude fields. How can I find the documents in th table based on how far away (e.g. 200m or 600ft) they are from my current location? The query must be something that can be run from a mobile app. I am using Xamarin.</p>
  
  <p>from reading through some other posts I see that</p>
  
  <p>1/ mongodb and couchbase appear to have some of that functionality built in; using geo indexes, .... didn't realy find anything for dynamodb except for a server library which would not work for a mobile app</p>
  
  <p>2/ in a mysql query a potential solution would be something like this</p>
  
  <p>[quoted from another post  on stackexchange (and in this example the distance is 25 miles from location 37,-122):]</p>
  
  <pre><code>SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * 
  cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * 
  sin( radians( lat ) ) ) ) AS distance FROM your_table_name HAVING
  distance &lt; 25 ORDER BY distance LIMIT 0 , 20;
  </code></pre>
  
  <p>How can I do something like this and retrieve the documents that match?</p>