Sunday, July 15, 2012

Re: Query Distance from User

On Sun, 15 Jul 2012 09:47:12 -0700 (PDT), JJ Zolper
<codingatmt@gmail.com> declaimed the following in
gmane.comp.python.django.user:


> First the user enters their town for example so Vienna, VA. Then they
> choose how far from their location so 25 miles. But then they also have an
> advanced search option where they can refine their request even more. They
> are able to play around with a Google Map on the side and zoom into their
> physical house location on the map and put a marker/point there of some
> sort. This could be lat/long I don't know yet. This way if that data checks
> out they get an even more accurate representation of the artists in their
> area. Any thoughts or opinions on how you think I should go about this?
>
I'm tempted to suggest using UTM internally, but you'd probably end
up with somebody living on the edge of a zone, and having to special
case the search radius as it crosses the zone boundary.

Reason to consider UTM? Coordinates are in meters, and computing if
a point is within a 40000m (40km => ~25 miles) just becomes a case of
applying Pythagoras [sqrt((x1-x2)^2 + (y1-y2)^2) <= radius].

http://www.uwgb.edu/dutchs/usefuldata/utmformulas.htm
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/

--
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