Changeset 9662 for src/django_gheat
- Timestamp:
- Sep 5, 2011, 3:47:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/tile.py
r9577 r9662 4 4 # 5 5 # Rick van der Zwet <info@rickvanderzwet.nl> 6 from collections import defaultdict 6 7 from django.core.management import setup_environ 7 8 from django.db.models import Max … … 208 209 # Limit such that high level zooms does not get the whole database 209 210 metingen = Meting.objects.filter(**filter).order_by('?')[:1000].values_list('latitude', 'longitude', 'signaal') 211 212 # Round numbers example to a less fine grain measurements 213 # d = defaultdict(list) 214 # for lat,lon, signaal in metingen: 215 # d[(round(lat,5),round(lon,5))].append(signaal) 216 217 # metingen = [] 218 # for (lat,lon),signals in d.iteritems(): 219 # metingen.append((lat,lon,max(signals))) 210 220 211 221 # XXX: Signal is not normalized in the database making it unknown when a
Note:
See TracChangeset
for help on using the changeset viewer.