Wednesday, April 25, 2012

Unable to get result using distance query

Hi,

I am using PointField to store longitude and latitude with SRID 4326.
All my places are in USA. Now, given a reference point, I do

lat = "41.881944"
lng = "-87.627778"

ref_pnt = fromstr("POINT(%s %s)" % (lng, lat))
distance_from_point = {'m':'50'}
r_gis =
PLaces.objects.filter(poly__distance_lte=(ref_pnt,D(**distance_from_point)))


But, I am getting an error

DatabaseError: Coordinate values are out of range [-180 -90,
180 90] for GEOGRAHY type

What is wrong?

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate