4 ms·
I recently built a site for finding vineyards, and used GeoDjango with Postgres+PostGIS. Setting up was a small PITA, but a bounding box query looks like this:
by nym 16y ago
I recently built a site for finding vineyards, and used GeoDjango with Postgres+PostGIS.
Setting up was a small PITA, but a bounding box query looks like this:
footprint = Polygon(((ullon, ullat), (lrlon, ullat), (lrlon, lrlat), (ullon, lrlat), (ullon, ullat)))
vineyards = Winery.objects.filter(loc__within=footprint)
If you're interested, check it out: http://finelocalwine.com/ http://finelocalwine.com/
- Azuldolphin 16y agoThanks a lot, that looks like it's along the same lines as what I'm trying to do. How did you test this locally? Does Sqlite support this? Or did you set up PostgreSQL on your development machine?
- nym 16y agoYeah, you have to set it up locally, but again, it's worth it.