Skip to content

Instantly share code, notes, and snippets.

@mjumbewu
Created October 8, 2011 16:52
Show Gist options
  • Save mjumbewu/1272540 to your computer and use it in GitHub Desktop.
Save mjumbewu/1272540 to your computer and use it in GitHub Desktop.
mapping notes
# 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