Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 1863

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: m.cogo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>m.cogo</b></em>  - A simple utility for converting bearing and distance measurements to coordinates and vice versa.<BR>
It assumes a cartesian coordinate system
<h2>KEYWORDS</h2>
miscellaneous
<h2>SYNOPSIS</h2>
<b>m.cogo</b><br>
<b>m.cogo help</b><br>
<b>m.cogo</b> [-<b>lqr</b>]  [<b>input</b>=<em>name</em>]   [<b>output</b>=<em>name</em>]   [<b>coord</b>=<em>x,y</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-l</b></DT>
<DD>Lines are labelled</DD>

<DT><b>-q</b></DT>
<DD>Suppress warnings</DD>

<DT><b>-r</b></DT>
<DD>Convert from coordinates to bearing and distance</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name</em></DT>
<DD>Name of input file</DD>
<DD>Default: <em>-</em></DD>

<DT><b>output</b>=<em>name</em></DT>
<DD>Name for output file</DD>
<DD>Default: <em>-</em></DD>

<DT><b>coord</b>=<em>x,y</em></DT>
<DD>Starting coordinate pair</DD>
<DD>Default: <em>0.0,0.0</em></DD>

</DL>
<H2>DESCRIPTION</H2>

<EM>m.cogo</EM> 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.

<P>
Input can be entered via standard input (default) or from the file
<B>input=</B><EM>name</EM>. 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 <B>-l</B> flag).

<P>
<B>Example COGO input:</B>
<P>
P23 N 23:14:12 W 340<BR>
P24 S 04:18:56 E 230<BR>
...<BR>
<P>
The first column may contain a label and you must use the <B>-l</B>
flag so the program knows.  This is followed by a space, and then
either the character 'N' or 'S' to indicate whether the bearing is
relative to the north or south directions.  After another space,
the angle begins.  Generally, the angle can be of the form
<EM>digits + separator + digits + separator + digits [+ '.' + digits]</EM>.
A space follows the angle, and is then followed by either the 'E' or 'W'
characters. A space separates the bearing from the distance (which should
be in appropriate linear units).

<P>
<B>Output of the above input:</B>
<P>
-134.140211 312.420236 P23<BR>
-116.832837 83.072345 P24<BR>
...<BR>
<P>
Unless specified with the <B>coord</B> option, calculations begin from (0,0).

<P>
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 &lt;distance&gt; units in that direction to get to the 
next station.
</P>

<EM>m.cogo</EM> can be run either non-interactively or
interactively.  The program will be run non-interactively
if the user specifies any parameter or flag. Use "m.cogo -",
to run the program in a pipeline.  Without any flags or
parameters, <EM>m.cogo</EM> will prompt for each value
using the familiar GRASS parser interface.

<P>


<H2>NOTES</H2>

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.

<H2>AUTHOR</H2>

Eric G. Miller

<p><i>Last changed: $Date: 2005-06-21 06:18:52 +0200 (Tue, 21 Jun 2005) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="misc.html">misc index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>