Trees | Indices | Help |
|
---|
|
edist - Simple command line coordinate processing.
edist operates on one, or more, locations specified in the following format [+-]DD.DD;[+-]DDD.DD. For example, a location string of 52.015;-0.221 would be interpreted as 52.015 degrees North by 0.221 degrees West. Positive values can be specified with a + prefix, but it isn't required.
For example:
$ ./edist.py --sunrise --sunset --ascii '52.015;-0.221' $ ./edist.py --destination 20@45 -- '-52.015;0.221'
In the second example the locations are separated by '--', which stops processing options and allows you to specify locations beginning with a hyphen(such as anywhere in the Southern hemisphere).
Note: In most shells the locations must be quoted because of the special nature of the semicolon.
Version: 0.11.0
Author: James Rowe
Copyright: Copyright (C) 2007-2008 James Rowe
Status: WIP
License: GNU General Public License Version 3
|
|||
LocationsError Error object for data parsing error |
|||
NumberedPoint Class for representing locations from command line |
|||
NumberedPoints Class for representing a group of NumberedPoint objects |
|
|||
tuple of list , dict and list
|
|
||
dict
|
|
||
tuple of dict and list
|
|
||
int
|
|
|
|||
USAGE =
|
|
Main command line interface >>> saved_args = sys.argv[1:] >>> sys.argv[1:] = ["-p", "52.015;-0.221"] >>> modes, opts, args = process_command_line() >>> modes, args (['display'], ['52.015;-0.221']) >>> sys.argv[1:] = ["-d", "-b", "52.015;-0.221", "52.168;0.040"] >>> modes, opts, args = process_command_line() >>> modes, args (['distance', 'bearing'], ['52.015;-0.221', '52.168;0.040']) >>> sys.argv[1:] = saved_args
|
|
Pull locations from a user's CSV file Read gpsbabel's CSV output format >>> locations, names = read_csv(open("gpsbabel")) >>> sorted(locations.items()) [('01:My place', ('52.01500', '-0.22100')), ('02:Microsoft Research Cambridge', ('52.16700', '00.39000'))] >>> names ['01:My place', '02:Microsoft Research Cambridge']
|
Main script handler >>> saved_args = sys.argv[1:] >>> sys.argv[1:] = ["-p", "52.015;-0.221"] >>> main() Location 1 is 52°00′54″N, 000°13′15″W >>> sys.argv[1:] = ["-s", "22@40", "52.015;-0.221"] >>> main() Destination from location 1 is 52°09′59″N, 000°00′48″W >>> sys.argv[1:] = saved_args
|
|
USAGE
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 20 12:40:57 2008 | http://epydoc.sourceforge.net |