1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
|
<HTML>
<HEAD>
<TITLE>project</TITLE>
</HEAD>
<BODY>
<H1>project</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
project - project data along a line or great circle, gen
erate a profile track, or translate coordinates.
</PRE>
<H2>SYNOPSIS</H2><PRE>
<B>project</B> [ <I>infile</I> ] <B>-F</B><I>flags</I> <B>-C</B><I>cx/cy</I> [ <B>-A</B><I>azimuth</I> ] [ <B>-Dd|g</B> ]
[ <B>-E</B><I>bx/by</I> ] [ <B>-G</B><I>dist</I> ] [ <B>-H</B>[<I>nrec</I>] ] [ <B>-L</B>[<B>w</B>][<I>l</I><B>_</B><I>min/l</I><B>_</B><I>max</I>] ]
[ <B>-M</B>[<I>flag</I>] ] [ <B>-N</B> ] [ <B>-Q</B> ] [ <B>-S</B> ] [ <B>-T</B><I>px/py</I> ] [ <B>-V</B> ] [
<B>-W</B><I>w</I><B>_</B><I>min/w</I><B>_</B><I>max</I> ] [ <B>-:</B> ] [ <B>-bi</B>[<B>s</B>][<I>n</I>] ] [ <B>-bo</B>[<B>s</B>] ]
</PRE>
<H2>DESCRIPTION</H2><PRE>
<B>project</B> reads arbitrary (<I>x,</I> <I>y</I>[, <I>z</I>]) data from standard
input [or <I>infile</I> ] and writes to standard output any com
bination of (<I>x,</I> <I>y,</I> <I>z,</I> <I>p,</I> <I>q,</I> <I>r,</I> <I>s</I>), where (<I>p,</I> <I>q</I>) are the
coordinates in the projection, (<I>r,</I> <I>s</I>) is the position in
the (<I>x,</I> <I>y</I>) coordinate system of the point on the profile
(<I>q</I> = 0 path) closest to (<I>x,</I> <I>y</I>), and <I>z</I> is all remaining
columns in the input (beyond the required <I>x</I> and <I>y</I>
columns). Alternatively, <B>project</B> may be used to generate
(<I>r,</I> <I>s,</I> <I>p</I>) triples at equal increments <I>dist</I> along a pro
file. In this case ( <B>-G</B> option), no input is read. Pro
jections are defined in any (but only) one of three ways:
(Definition 1) By a Center <B>-C</B> and an Azimuth <B>-A</B> in degrees
clockwise from North. (Definition 2) By a Center <B>-C</B> and
end point E of the projection path <B>-E</B>. (Definition 3) By
a Center <B>-C</B> and a roTation pole position <B>-T</B>. To spheri
cally project data along a great circle path, an oblique
coordinate system is created which has its equator along
that path, and the zero meridian through the Center. Then
the oblique longitude (<I>p</I>) corresponds to the distance from
the Center along the great circle, and the oblique lati
tude (<I>q</I>) corresponds to the distance perpendicular to the
great circle path. When moving in the increasing (<I>p</I>)
direction, (toward <I>B</I> or in the <I>azimuth</I> direction), the
positive (<I>q</I>) direction is to your left. If a Pole has
been specified, then the positive (<I>q</I>) direction is toward
the pole. To specify an oblique projection, use the <B>-T</B>
option to set the Pole. Then the equator of the projection
is already determined and the <B>-C</B> option is used to locate
the <I>p</I> = 0 meridian. The Center <I>cx/cy</I> will be taken as a
point through which the <I>p</I> = 0 meridian passes. If you do
not care to choose a particular point, use the South pole
(<I>ox</I> = 0, <I>oy</I> = -90). Data can be selectively windowed by
using the <B>-L</B> and <B>-W</B> options. If <B>-W</B> is used, the projection
Width is set to use only points with <I>w</I><B>_</B><I>min</I> < q < <I>w</I><B>_</B><I>max</I>. If
<B>-L</B> is set, then the Length is set to use only those points
with <I>l</I><B>_</B><I>min</I> < p < <I>l</I><B>_</B><I>max</I>. If the <B>-E</B> option has been used to
define the projection, then <B>-Lw</B> may be selected to window
the length of the projection to exactly the span from <B>O</B> to
<B>B</B>. Flat earth (cartesian) coordinate transformations can
also be made. Set <B>-N</B> and remember that <I>azimuth</I> is clock
wise from North (the <I>y</I> axis), NOT the usual cartesian
theta, which is counterclockwise from the <I>x</I> axis. <I>azimuth</I>
If <B>-Q</B> is selected, map units are assumed and <I>x,</I> <I>y,</I> <I>r,</I> <I>s</I>
must be in degrees and <I>p,</I> <I>q,</I> <I>dist,</I> <I>l</I><B>_</B><I>min,</I> <I>l</I><B>_</B><I>max,</I> <I>w</I><B>_</B><I>min,</I>
<I>w</I><B>_</B><I>max</I> will be in km. <B>project</B> is CASE SENSITIVE. Use UPPER
CASE for all one-letter designators which begin optional
arguments. Use lower case for the xyzpqrs letters in
<B>-flags</B>.
<B>-C</B> <I>cx/cy</I> sets the origin of the projection, in Defini
tion 1 or 2. If Definition 3 is used (<B>-T</B>), then
<I>cx/cy</I> are the coordinates of a point through which
the oblique zero meridian (<I>p</I> = 0) should pass.
</PRE>
<H2>OPTIONS</H2><PRE>
<I>infile</I> name of ASCII (or binary, see <B>-bi</B>) file(s) with 2
or more columns holding (x,y,[z]) data values. If
no filenames are given, project will read from
standard input. If the <B>-G</B> option is selected, no
input data are read.
<B>-F</B> Specify your desired output using any combination
of <I>xyzpqrs</I>, in any order. Do not space between the
letters. Use lower case. The output will be ASCII
(or binary) columns of values corresponding to
<I>xyzpqrs</I>. If both input and output are using ASCII
format then the <I>z</I> data are treated as
textstring(s). If the <B>-G</B> option is selected, the
output will be <I>rsp</I>.
<B>-A</B> <I>azimuth</I> defines the azimuth of the projection (Def
inition 1).
<B>-D</B> Set the location of the Discontinuity in longitude
(<I>r</I> coordinate). <B>-Dd</B> will place the discontinuity at
the Dateline, (-180 < <I>r</I> < 180); <B>-Dg</B> will place it
at Greenwich, (0 < <I>r</I> < 360). Default usually falls
at dateline due to <I>atan2</I> calls.
<B>-E</B> <I>bx/by</I> defines the end point of the projection path
(Definition 2).
<B>-G</B> <I>dist</I> Generate mode. No input is read. Create (<I>r,</I> <I>s,</I>
<I>p</I>) output points every <I>dist</I> units of <I>p</I>. See <B>-Q</B>
option.
<B>-H</B> Input file(s) has Header record(s). Number of
header records can be changed by editing your .gmt
defaults file. If used, <B><A HREF="GMT.html">GMT</A></B> default is 1 header
record.
<B>-L</B> Length controls. Project only those points whose <I>p</I>
coordinate is within <I>l</I><B>_</B><I>min</I> < <I>p</I> < <I>l</I><B>_</B><I>max</I>. If <B>-E</B> has
<B>-M</B> Multiple segment file(s). Segments are separated by
a special record. For ASCII files the first char
acter must be <I>flag</I> [Default is '>']. For binary
files all fields must be NaN.
<B>-N</B> Flat earth. Make a cartesian coordinate transforma
tion in the plane. [Default uses spherical
trigonometry.]
<B>-Q</B> Map type units, i.e., project assumes <I>x,</I> <I>y,</I> <I>r,</I> <I>s</I>
are in degrees while <I>p,</I> <I>q,</I> <I>dist,</I> <I>l</I><B>_</B><I>min,l</I> <B>_</B><I>max,</I>
<I>w</I><B>_</B><I>min,</I> <I>w</I><B>_</B><I>max</I> are in km. If <B>-Q</B> is not set, then all
these are assumed in same units.
<B>-S</B> Sort the output into increasing <I>p</I> order. Useful
when projecting random data into a sequential pro
file.
<B>-T</B> <I>px/py</I> sets the position of the roTation pole of the
projection. (Definition 3).
<B>-V</B> Selects verbose mode, which will send progress
reports to stderr [Default runs "silently"].
<B>-W</B> Width controls. Project only those points whose <I>q</I>
coordinate is within <I>w</I><B>_</B><I>min</I> < <I>q</I> < <I>w</I><B>_</B><I>max</I>.
<B>-:</B> Toggles between (longitude,latitude) and (lati
tude,longitude) input/output. [Default is (longi
tude,latitude)]. Applies to geographic coordinates
only.
<B>-bi</B> Selects binary input. Append <B>s</B> for single precision
[Default is double]. Append <I>n</I> for the number of
columns in the binary file(s). [Default is 2 input
columns].
<B>-bo</B> Selects binary output. Append <B>s</B> for single preci
sion [Default is double].
</PRE>
<H2>EXAMPLES</H2><PRE>
To generate points every 10km along a great circle from
10N,50W to 30N,10W, try:
<B>project</B> <B>-C</B>-50/10 <B>-E</B>-10/30 <B>-G</B>10 <B>-Q</B> > great_cir
cle_points.xyp
(Note that great_circle_points.xyp could now be used as
input for <B><A HREF="grdtrack.html">grdtrack</A></B>, etc. ).
To project the shiptrack gravity, magnetics, and
N20W at the origin, keeping only the data from NE of the
profile and within +/- 500 km of the origin, try:
<B>project</B> c2610.xygmb <B>-C</B>-30/-30 <B>-A</B>-20 <B>-W</B>-10000/0 <B>-L</B>-500/500
<B>-F</B>pz <B>-Q</B> > c2610_projected.pgmb
(Note in this example that <B>-W</B>-10000/0 is used to admit any
value with a large negative <I>q</I> coordinate. This will take
those points which are on our right as we walk along the
great circle path, or to the NE in this example.)
To make a cartesian coordinate transformation of mydata.xy
so that the new origin is at 5,3 and the new <I>x</I> axis (<I>p</I>)
makes an angle of 20 degrees with the old <I>x</I> axis, try:
<B>project</B> mydata.xy <B>-C</B>5/3 <B>-A</B>70 <B>-F</B>pq > mydata.pq
To take data in the file pacific.lonlat and transform it
into oblique coordinates using a pole from the hotspot
reference frame and placing the oblique zero meridian (<I>p</I> =
0 line) through Tahiti, try:
<B>project</B> pacific.lonlat <B>-T</B>-75/68 <B>-C</B>-149:26/-17:37 <B>-F</B>pq >
pacific.pq
Suppose that pacific_topo.grd is a grdfile of bathymetry,
and you want to make a file of flowlines in the hotspot
reference frame. If you try:
<B><A HREF="grd2xyz.html">grd2xyz</A></B> pacific_topo.grd | <B>project</B> <B>-T</B>-75/68 <B>-C</B>0/-90 <B>-F</B>xyq
| <B><A HREF="xyz2grd.html">xyz2grd</A></B> <B>-R</B><I>etc</I> <B>-I</B><I>etc</I> <B>-C</B>flow.grd
then flow.grd is a file in the same area as
pacific_topo.grd, but flow contains the latitudes about
the pole of the projection. You now can use grdcontour on
flow.grd to draw lines of constant oblique latitude, which
are flow lines in the hotspot frame.
If you have an arbitrarily rotation pole <I>px/py</I> and you
would like to draw an oblique small circle on a map, you
will first need to make a file with the oblique coordi
nates for the small circle (i.e., lon = 0-360, lat is con
stant), then create a file with two records: the north
pole (0/90) and the origin (0/0), and find what their
oblique coordinates are using your rotation pole. Now, use
the projected North pole and origin coordinates as the
rotation pole and center, respectively, and project your
file as in the pacific example above. This gives coordi
nates for an oblique small circle.
</PRE>
<H2>SEE ALSO</H2><PRE>
<I><A HREF="fitcircle.html">fitcircle</A></I>(l), <I>gmt</I>(l), <I>mapproject</I>(l), <I>grdproject</I>(l)
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
<body bgcolor="#ffffff">
|