project - project data along a line or great circle, generate a profile track, or translate coordinates.

project[infile]-Fflags-Ccx/cy[-Aazimuth] [-Dd|g] [-Ebx/by] [-Gdist] [-H[nrec] ] [-L[w][l_min/l_max] ] [-M[flag] ] [-N] [-Q] [-S] [-Tpx/py] [-V] [-Ww_min/w_max] [-:] [-bi[s][n] ] [-bo[s][n] ] [-f[i|o]colinfo]

projectreads arbitrary (x,y[,z]) data from standard input [orinfile] and writes to standard output any combination of (x,y,z,p,q,r,s), where (p,q) are the coordinates in the projection, (r,s) is the position in the (x,y) coordinate system of the point on the profile (q= 0 path) closest to (x,y), andzis all remaining columns in the input (beyond the requiredxandycolumns). Alternatively,projectmay be used to generate (r,s,p) triples at equal incrementsdistalong a profile. In this case (-Goption), no input is read. Projec- tions are defined in any (but only) one of three ways: (Definition 1) By a Center-Cand an Azimuth-Ain degrees clockwise from North. (Definition 2) By a Center-Cand end point E of the projection path-E. (Definition 3) By a Center-Cand a roTation pole position-T. To spherically project data along a great circle path, an oblique coordi- nate system is created which has its equator along that path, and the zero meridian through the Center. Then the oblique longitude (p) corre- sponds to the distance from the Center along the great circle, and the oblique latitude (q) corresponds to the distance perpendicular to the great circle path. When moving in the increasing (p) direction, (towardBor in theazimuthdirection), the positive (q) direction is to your left. If a Pole has been specified, then the positive (q) direction is toward the pole. To specify an oblique projection, use the-Toption to set the Pole. Then the equator of the projection is already determined and the-Coption is used to locate thep= 0 meridian. The Centercx/cywill be taken as a point through which thep= 0 meridian passes. If you do not care to choose a particular point, use the South pole (ox= 0,oy= -90). Data can be selectively windowed by using the-Land-Woptions. If-Wis used, the projection Width is set to use only points withw_min< q <w_max. If-Lis set, then the Length is set to use only those points withl_min< p <l_max. If the-Eoption has been used to define the projection, then-Lwmay be selected to window the length of the pro- jection to exactly the span fromOtoB. Flat earth (Cartesian) coordinate transformations can also be made. Set-Nand remember thatazimuthis clockwise from North (theyaxis), NOT the usual cartesian theta, which is counterclockwise from thexaxis.azimuth= 90 - theta. No assumptions are made regarding the units forx,y,r,s,p,q,dist,l_min,l_max,w_min,w_max. If-Qis selected, map units are assumed andx,y,r,smust be in degrees andp,q,dist,l_min,l_max,w_min,w_maxwill be in km. Calculations of specific great-circle distances or for back-azimuths or azimuths are better done usingmapproject.projectis CASE SENSITIVE. Use UPPER CASE for all one-letter designa- tors which begin optional arguments. Use lower case for the xyzpqrs letters in-flags.-Ccx/cysets the origin of the projection, in Definition 1 or 2. If Definition 3 is used (-T), thencx/cyare the coordinates of a point through which the oblique zero meridian (p= 0) should pass.

infilename of ASCII (or binary, see-bi) file(s) with 2 or more columns holding (x,y,[z]) data values. If no filenames are given,projectwill read from standard input. If the-Goption is selected, no input data are read.-FSpecify your desired output using any combination ofxyzpqrs, in any order. Do not space between the letters. Use lower case. The output will be ASCII (or binary, see-bo) columns of values cor- responding toxyzpqrs. If both input and output are using ASCII format then thezdata are treated as textstring(s). If the-Goption is selected, the output will bersp.-Aazimuthdefines the azimuth of the projection (Definition 1).-DSet the location of the Discontinuity in longitude (rcoordi- nate).-Ddwill place the discontinuity at the Dateline, (-180 <r< 180);-Dgwill place it at Greenwich, (0 <r< 360). Default usually falls at dateline due toatan2calls.-Ebx/bydefines the end point of the projection path (Definition 2).-GdistGenerate mode. No input is read. Create (r,s,p) output points everydistunits ofp. See-Qoption.-HInput file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults4 file. If used,GMTdefault is 1 header record. Use-Hiif only input data should have header records [Default will write out header records if the input data have them].-LLength controls. Project only those points whosepcoordinate is withinl_min<p<l_max. If-Ehas been set, then you may use-Lwto stay within the distance fromCtoE.-MMultiple segment file(s). Segments are separated by a special record. For ASCII files the first character must beflag[Default is ’>’]. For binary files all fields must be NaN and-bo[s]nmust set the number of output columns explicitly.-NFlat earth. Make a Cartesian coordinate transformation in the plane. [Default uses spherical trigonometry.]-QMap type units, i.e., project assumesx,y,r,sare in degrees whilep,q,dist,l_min,l_max,w_min,w_maxare in km. If-Qis not set, then all these are assumed to be in the same units.-SSort the output into increasingporder. Useful when projecting random data into a sequential profile.-Tpx/pysets the position of the roTation pole of the projection. (Definition 3).-VSelects verbose mode, which will send progress reports to stderr [Default runs "silently"].-WWidth controls. Project only those points whoseqcoordinate is withinw_min<q<w_max.-:Toggles between (longitude,latitude) and (latitude,longitude) input and/or output. [Default is (longitude,latitude)]. Appendito select input only oroto select output only. [Default affects both].-biSelects binary input. Appendsfor single precision [Default is double]. Appendnfor the number of columns in the binary file(s). [Default is 2 input columns].-boSelects binary output. Appendsfor single precision [Default is double]. Appendnfor the number of columns in the binary file(s).-fSpecial formatting of input and output columns (time or geo- graphical data) Specifyi(nput) oro(utput) [Default is both input and output]. Give one or more columns (or column ranges) separated by commas. AppendT(Absolute calendar time),t(time relative to chosen TIME_EPOCH),x(longitude),y(latitude),g(geographic coordinate), orf(floating point) to each column or column range item.

To generate points every 10km along a great circle from 10N,50W to 30N,10W:project-C-50/10-E-10/30-G10-Q> great_circle_points.xyp (Note that great_circle_points.xyp could now be used as input forgrd-track, etc. ). To project the shiptrack gravity, magnetics, and bathymetry in c2610.xygmb along a great circle through an origin at 30S, 30W, the great circle having an azimuth of N20W at the origin, keeping only the data from NE of the profile and within +/- 500 km of the origin, run:projectc2610.xygmb-C-30/-30-A-20-W-10000/0-L-500/500-Fpz-Q> c2610_projected.pgmb (Note in this example that-W-10000/0 is used to admit any value with a large negativeqcoordinate. 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 newxaxis (p) makes an angle of 20 degrees with the oldxaxis, use:projectmydata.xy-C5/3-A70-Fpq > 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 (p= 0 line) through Tahiti, run:projectpacific.lonlat-T-75/68-C-149:26/-17:37-Fpq > 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 run:grd2xyzpacific_topo.grd |project-T-75/68-C0/-90-Fxyq |xyz2grd-Retc-Ietc-Cflow.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 polepx/pyand you would like to draw an oblique small circle on a map, you will first need to make a file with the oblique coordinates for the small circle (i.e., lon = 0-360, lat is constant), then create a file with two records: the north pole (0/90) and the origin (0/0), and find what their oblique coordi- nates 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 coor- dinates for an oblique small circle.

fitcircle(l),gmt(l),mapproject(l),grdproject(l) GMT4.0 1 Oct 2004 PROJECT(l)

Man(1) output converted with man2html