Created
October 8, 2011 16:52
-
-
Save mjumbewu/1272540 to your computer and use it in GitHub Desktop.
mapping notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run 'python manage.py shell'... | |
from django.contrib.gis.geos import Point | |
from septa.models import SeptaStops, SeptaRoutes | |
ONE_MILE = 0.015 | |
# This is around Devnuts HQ | |
my_location = Point(-75.142257, 39.965165) | |
nearby = my_location.buffer(ONE_MILE / 2) | |
routes = SeptaRoutes.objects.filter(the_geom__intersects=nearby) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment