From ddfeee122646e020cd5ad913bed05e29d2281573 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 23 May 2012 16:20:00 +0530 Subject: [PATCH] adjust default distance values for nearby_areas and stops --- chaloBEST/mumbai/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chaloBEST/mumbai/models.py b/chaloBEST/mumbai/models.py index 26fb801..3086d9c 100644 --- a/chaloBEST/mumbai/models.py +++ b/chaloBEST/mumbai/models.py @@ -108,7 +108,7 @@ class Area(models.Model): #FIXME: ideally this would be done using the polygon of the area, but right now we take a random stop in the area, find all stops within x kms, and then return unique areas for those stops. @property - def nearby_areas(self, distance=D(km=5)): + def nearby_areas(self, distance=D(km=3)): stop = self.stop_set.all()[0] tup = (stop.point, distance,) qset = Stop.objects.filter(point__distance_lte=tup).values('area').distinct() @@ -210,7 +210,7 @@ class Stop(models.Model): return self.get_geojson(srid=srid) @property - def nearby_stops(self, dist=D(km=2)): + def nearby_stops(self, dist=D(km=1)): tup = (self.point, dist,) return Stop.objects.filter(point__distance_lte=tup)