The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) Le 11 août 2011 17:09, "Thomas Weholt" <thomas.weh...@gmail.com> a écrit : > I got a model with longitude and latitude and want to be able to find > other objects nearby a selected object. Can this be done using the > django orm? What is the best approach to do this in a django project? > > I found a answer on Stackoverflow, but doesn't work with sqlite. Doing > it in SQL is ok and probably the best solution performance wise, but > if it has to be done in python I'll do that too. > > Ref question on stackoverflow: > http://stackoverflow.com/questions/4610717/django-determining-if-geographic-coordinates-are-inside-of-an-circle > > -- > Mvh/Best regards, > Thomas Weholt > http://www.weholt.org > > -- > You received this message because you are subscribed to the Google Groups "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/django-users?hl=en. >
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.