On Jun 13, 9:56 am, Daniel Hilton <[email protected]> wrote:
> On 13 June 2010 06:24, Tyler Andersen <[email protected]> wrote:
>
> > I'm trying to figure out how to take two Point objects and determine
> > the distance between them.
>
> > It seems that it is trivial to search the DB (well, provided that I'm
> > not using mySQL, which I am) to filter by distance, however, that's
> > not what I'm looking for at the moment.
>
> > I have a set of Point objects, and I'd like to compute the distance in
> > miles for each.
>
> > For Point objects a, b, one can "a.distance(b)", however, a number is
> > returned not a Distance object. I'm having trouble finding
> > documentation on what this value represents (I could perhaps plug it
> > into D(????=a.distance(b)).mi).
>
> Try this query on the Geodjango list:http://groups.google.com/group/geodjango

Thanks, I'll re-post there.

>
> But to try and answer your question:
>
> Are you trying to get the distance of a set of objects from a point?
>
> So for example, say you were looking for houses from a railway
> station? Or are you looking at finding the distance between each of a
> set of points that have an order? Like waypoints on a path?
>
> As for what metric it returns, I'd say have a look at the documentation 
> here:http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#distance...


For simplicity, I'd just like to address the case of measuring the
distance between two points. No DB involved.

Tyler


>
> Hope that helps,
> Cheers,
> Dan
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Dan Hilton
> ============================www.twitter.com/danhiltonwww.DanHilton.co.uk
> ============================

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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.

Reply via email to