Does django have anything that will look at a geographic coordinate (decimal lat/long) and determine if is inside a circle with a certain radius (let’s say 100 Km)?
I have certain type of data, each has a lat/long and I would like to make a search in the database to see if that data is located inside of a circle with a specified radius size.
I could probably write something myself that will handle this but I wander if there is something written already that will handle this.
This problem can be solved in pure SQL if you dont mind about very good precision.
You can find points around a GPS position with this specific SQL query :
This will give you all records with gps records in a 50km area.
You can easily plug this in django with :
or with django raw queries