other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
| m.cogo(1grass) | Grass User's Manual | m.cogo(1grass) |
NAME¶
m.cogo - A simple utility for converting bearing and distance measurements to coordinates and vice versa.KEYWORDS¶
miscellaneous, distanceSYNOPSIS¶
m.cogoFlags:¶
- -l
-
Lines are labelled
- -q
-
Suppress warnings
- -r
-
Convert from coordinates to bearing and distance
- -c
-
Repeat the starting coordinate at the end to close a loop
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- input=name
-
Name of input fileDefault: -
- output=name
-
Name for output fileDefault: -
- coord=x,y
-
Starting coordinate pairDefault: 0.0,0.0
DESCRIPTION¶
m.cogo converts data points between bearing and distance and X,Y coordinates. Only simple bearing/distance or coordinate pairs are handled. It assumes a cartesian coordinate system. Input can be entered via standard input (default) or from the file input=name. Specifying the input as "-" also specifies standard input, and is useful for using the program in a pipeline. Output will be to standard output unless a file name other than "-" is specified. The input file must closely adhere to the following format, where up to a 10 character label is allowed but not required (see -l flag). Example COGO input:P23 N 23:14:12 W 340
P24 S 04:18:56 E 230
...
-134.140211 312.420236 P23
-116.832837 83.072345 P24
...
NOTES¶
This program is very simplistic, and will not handle deviations from the input format explained above. Currently, the program doesn't do anything particularly useful with the output. However, it is envisioned that this program will be extended to provide the capability to generate vector and/or sites layers.EXAMPLE¶
m.cogo -l in=cogo.dat
m.cogo -l in=cogo.dat | m.cogo -rl in="-"
m.cogo -l in=cogo.dat | v.in.ascii out=cogo_points x=1 y=2 fs=space
m.cogo -l in=cogo.dat | tac | awk '
BEGIN { FS=" " ; R=0 }
$1~/\d*\.\d*/ { printf(" %.8f %.8f\n", $1, $2) ; ++R }
END { printf("L %d\n", R) }' | tac | \
v.in.ascii -n format=standard out=cogo_line
SEE ALSO¶
v.centroids, v.clean, v.digit, v.in.ascii, v.typeAUTHOR¶
Eric G. Miller Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $ Full index © 2003-2014 GRASS Development Team| GRASS 6.4.4 |