Hi, I am currently making a mashup of the Weather Channel's RSS feeds (temperature and wind speed data) and Google maps with Django. Briefly it puts weather data on a map, e.g. sunny in London, rain in Edinburgh. I am having problems with comparing longitudes and latitudes in the database when they are negative. As an example, If I have in the database: locationID=1, lon = 3, lat = -1
If I try to find locations that are within one degree of longitude I believe I would do something like this: Location.objects.filter(lon__range=(2, 4)), this returns the correct locationIDs within 2 and 4 degrees longitudes. However if I do the same for latitude: Location.objects.filter(lat__range=(-3, -1)), it fails. Essentially my problem is I can't filter out database entries when comparing them to negative numbers (always works when positive). Does anyone know it it's a problem with SQL's between syntax or if it's Django? If it helps, the values are floats (decimal 5,2). Could anyone please help me? Thanks in advance, Ryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---