My Profile
model has this field:
location = models.PointField(geography=True, dim=2, srid=4326)
I'd like to calculate the distance between the two of these locations
(taking into account that the Earth is a spheroid) using GeoDjango, so that I can store this distance in the database.
- How can I calculate this distance with GeoDjango?
- What units are the results in?
- Is there a 'best' way to store this data? Float? Decimal?
I've reviewed previous, similar questions, and haven't found them useful. No answer gives enough explanation of what's happening or why it works.
I'm using Django 1.8 and the latest versions of required libraries for GeoDjango.
Thanks!