1m.cogo(1) Grass User's Manual m.cogo(1)
2
3
4
6 m.cogo - A simple utility for converting bearing and distance measure‐
7 ments to coordinates and vice versa. It assumes a cartesian coordinate
8 system
9
11 miscellaneous
12
14 m.cogo
15 m.cogo help
16 m.cogo [-lqr] [input=string] [output=string] [coord=x,y]
17
18 Flags:
19 -l Lines are labelled
20
21 -q Suppress warnings
22
23 -r Convert from coordinates to bearing and distance
24
25 Parameters:
26 input=string
27 Path to the input file Default: -
28
29 output=string
30 Path to an output file Default: -
31
32 coord=x,y
33 Starting coordinate pair Default: 0.0,0.0
34
36 m.cogo converts data points between bearing and distance and X,Y coor‐
37 dinates. Only simple bearing/distance or coordinate pairs are handled.
38 It assumes a cartesian coordinate system.
39
40 Input can be entered via standard input (default) or from the file
41 input=name. Specifying the input as "-" also specifies standard input,
42 and is useful for using the program in a pipeline. Output will be to
43 standard output unless a file name other than "-" is specified. The
44 input file must closely adhere to the following format, where up to a
45 10 character label is allowed but not required (see -l flag).
46
47 Example COGO input:
48
49 P23 N 23:14:12 W 340
50 P24 S 04:18:56 E 230
51
52 The first column may contain a label and you must use the -l flag so
53 the program knows. This is followed by a space, and then either the
54 character 'N' or 'S' to indicate whether the bearing is relative to the
55 north or south directions. After another space, the angle begins.
56 Generally, the angle can be of the form digits + separator + digits +
57 separator + digits [+ '.' + digits]. A space follows the angle, and is
58 then followed by either the 'E' or 'W' characters. A space separates
59 the bearing from the distance (which should be in appropriate linear
60 units).
61
62 Output of the above input:
63
64 -134.140211 312.420236 P23
65 -116.832837 83.072345 P24
66
67 Unless specified with the coord option, calculations begin from (0,0).
68
69 For those unfamiliar with the notation for bearings: Picture yourself
70 in the center of a circle. The first hemispere notation tell you
71 whether you should face north or south. Then you read the angle and
72 either turn that many degrees to the east or west, depending on the
73 second hemisphere notation. Finally, you move units in that direction
74 to get to the next station. m.cogo can be run either non-interactively
75 or interactively. The program will be run non-interactively if the
76 user specifies any parameter or flag. Use "m.cogo -", to run the pro‐
77 gram in a pipeline. Without any flags or parameters, m.cogo will
78 prompt for each value using the familiar GRASS parser interface.
79
81 This program is very simplistic, and will not handle deviations from
82 the input format explained above. Currently, the program doesn't do
83 anything particularly useful with the output. However, it is envi‐
84 sioned that this program will be extended to provide the capability to
85 generate vector and/or sites layers.
86
88 Eric G. Miller
89
90 Last changed: $Date: 2005/06/21 04:18:52 $
91
92 Full index
93
94
95
96GRASS 6.2.2 m.cogo(1)