Skip to content

Instantly share code, notes, and snippets.

@pifantastic
Created October 31, 2009 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pifantastic/223270 to your computer and use it in GitHub Desktop.
Save pifantastic/223270 to your computer and use it in GitHub Desktop.
bbox = Polygon.from_bbox((rect.x, rect.y, (rect.x + rect.width), (rect.y + rect.height)))
zipcodes = Zipcode.objects.filter(geom__intersects=bbox)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment