Re: Distance across a LineString in GeoDjango

2009-10-13 Thread Jani Tiainen
buttman kirjoitti: ls.srs.name > 'WGS 84' srs.units > (0.017453292519943282, 'degree') ls.length > 0.88329271346608429 > > So how do I go from degrees to miles? According to the docs, Distance > does not handle 'degrees' as a unit. Should I somehow convert to > another srs before I

Re: Distance across a LineString in GeoDjango

2009-10-12 Thread buttman
>>> ls.srs.name 'WGS 84' >>> srs.units (0.017453292519943282, 'degree') >>>ls.length 0.88329271346608429 So how do I go from degrees to miles? According to the docs, Distance does not handle 'degrees' as a unit. Should I somehow convert to another srs before I calculate distance? Or is there a be

Re: Distance across a LineString in GeoDjango

2009-10-11 Thread Jani Tiainen
HARRY POTTRER kirjoitti: > I have a model which represents a route. I can use the `make_line()` > geoqueryset method to create a LineString like so: > r = Route.objects.get(pk=33) # a route from Seattle to New York to Miami, a total distance # of about 3043.8 nautical miles r

Distance across a LineString in GeoDjango

2009-10-10 Thread HARRY POTTRER
I have a model which represents a route. I can use the `make_line()` geoqueryset method to create a LineString like so: >>> r = Route.objects.get(pk=33) >>> # a route from Seattle to New York to Miami, a total distance >>> # of about 3043.8 nautical miles >>> r >>> # a collection of the airports