.TH m.cogo 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBm.cogo\fR\fR \- A simple utility for converting bearing and distance measurements to coordinates and vice versa. .br It assumes a cartesian coordinate system .SH KEYWORDS miscellaneous, distance, polar .SH SYNOPSIS \fBm.cogo\fR .br \fBm.cogo \-\-help\fR .br \fBm.cogo\fR [\-\fBlrc\fR] [\fBinput\fR=\fIname\fR] [\fBoutput\fR=\fIname\fR] [\fBcoordinates\fR=\fIeast,north\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-l\fR" 4m .br Lines are labelled .IP "\fB\-r\fR" 4m .br Convert from coordinates to bearing and distance .IP "\fB\-c\fR" 4m .br Repeat the starting coordinate at the end to close a loop .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of input file .br Default: \fI\-\fR .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output file .br Default: \fI\-\fR .IP "\fBcoordinates\fR=\fIeast,north\fR" 4m .br Starting coordinate pair .br Default: \fI0.0,0.0\fR .SH DESCRIPTION \fIm.cogo\fR 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. .PP Input can be entered via standard input (default) or from the file \fBinput=\fR\fIname\fR. Specifying the input as \(dq\-\(dq 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 \(dq\-\(dq 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 \fB\-l\fR flag). .PP \fBExample COGO input:\fR .br .nf \fC P23 N 23:14:12 W 340 P24 S 04:18:56 E 230 ... \fR .fi .PP The first column may contain a label and you must use the \fB\-l\fR flag so the program knows. This is followed by a space, and then either the character \(cqN\(cq or \(cqS\(cq to indicate whether the bearing is relative to the north or south directions. After another space, the angle begins in degrees, minutes, and seconds in \(dqDDD:MM:SS.SSSS\(dq format. Generally, the angle can be of the form \fIdigits + separator + digits + separator + digits [+ \(cq.\(cq + digits]\fR. A space follows the angle, and is then followed by either the \(cqE\(cq or \(cqW\(cq characters. A space separates the bearing from the distance (which should be in appropriate linear units). .PP \fBOutput of the above input:\fR .br .nf \fC \-134.140211 312.420236 P23 \-116.832837 83.072345 P24 ... \fR .fi .PP Unless specified with the \fBcoord\fR option, calculations begin from (0,0). .SH NOTES For those unfamiliar with the notation for bearings: Picture yourself in the center of a circle. The first hemispere notation tell you whether you should face north or south. Then you read the angle and either turn that many degrees to the east or west, depending on the second hemisphere notation. Finally, you move units in that direction to get to the next station. .PP \fIm.cogo\fR can be run either non\-interactively or interactively. The program will be run non\-interactively if the user specifies any parameter or flag. Use \(dqm.cogo \-\(dq, to run the program in a pipeline. Without any flags or parameters, \fIm.cogo\fR will prompt for each value using the familiar GRASS parser interface. .PP This program is very simplistic, and will not handle deviations from the input format explained above. Currently, the program doesn\(cqt 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. .PP Lines may be closed by using the \fB\-c\fR flag or snapped with \fIv.clean\fR, lines may be converted to boundaries with \fIv.type\fR, and closed boundaries may be converted to areas with \fIv.centroids\fR. .SH EXAMPLES .br .nf \fC m.cogo \-l in=cogo.dat \fR .fi Where the cogo.dat input file looks like: .br .nf \fC # Sample COGO input file \-\- This defines an area. #