For the Google Maps application, I need to create a query that selects all the elements in my database that fall within a certain radius from a given latitude / longitude, given the lat / lng of each point. Is there an efficient way to do this in Django ORM?
The best way I've come up with is to select all the points that fall into the bounding box of this circle (with __range ) and then call an iterative function for all the selected lists to determine if they really fall into the circle.
My feeling can be a more effective way - how would you do it?
django google-maps
Herman Schaaf
source share