Hi all, I was looking at this rather old example for doing a proximity
search with geopy, for the lack of any other information - and
couldn't find the distance.arc_degrees and distance.calculate method.
Has that been deprecated for something else?
The sample code used arc_degrees as such:
rough_distance =
geopy.distance.arc_degrees(arcminutes=geopy.distance.nm(miles=distance))
* 2
queryset = queryset.filter(
latitude__range=(latitude - rough_distance, latitude +
rough_distance),
longitude__range=(longitude - rough_distance, longitude +
rough_distance)
)
.. and used distance.calculate as such:
exact_distance = geopy.distance.distance(
(latitude, longitude),
(location.latitude, location.longitude)
)
exact_distance.calculate()
I saw that distance had a measure(), which looks like it does what I
need it to do, but there's no documentation of what it's really meant
to do (but the only other method in Vincenty was distance()).
The full code snip for proximity search:
http://fairviewcomputing.com/blog/2008/04/16/django-geography-hacks/
Halp?
Thanks in advance.
- Jay