|-C||cx/cy sets the origin of the projection, in Definition 1 or 2. If Definition 3 is used (-T), then cx/cy are the coordinates of a point through which the oblique zero meridian (p = 0) should pass.|
infile name of ASCII (or binary, see -bi) 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 -G option is selected, no input data are read. -F Specify your desired output using any combination of xyzpqrs, in any order. Do not space between the letters. Use lower case. The output will be ASCII (or binary, see -bo) columns of values corresponding to xyzpqrs [Default]. If both input and output are using ASCII format then the z data are treated as textstring(s). If the -G option is selected, the output will be rsp. -A azimuth defines the azimuth of the projection (Definition 1). -D Set the location of the Discontinuity in longitude (r coordinate). -Dd will place the discontinuity at the Dateline, (-180 < r < 180); -Dg will place it at Greenwich, (0 < r < 360). Default usually falls at dateline due to atan2 calls. -E bx/by defines the end point of the projection path (Definition 2). -G dist Generate mode. No input is read. Create (r, s, p) output points every dist units of p. See -Q option. -H Input file(s) has header record(s). If used, the default number of header records is N_HEADER_RECS. Use -Hi if only input data should have header records [Default will write out header records if the input data have them]. Blank lines and lines starting with # are always skipped. -L Length controls. Project only those points whose p coordinate is within l_min < p < l_max. If -E has been set, then you may use -Lw to stay within the distance from C to E. -N Flat Earth. Make a Cartesian coordinate transformation in the plane. [Default uses spherical trigonometry.] -Q Map type units, i.e., project assumes x, y, r, s are in degrees while p, q, dist, l_min, l_max, w_min, w_max are in km. If -Q is not set, then all these are assumed to be in the same units. -S Sort the output into increasing p order. Useful when projecting random data into a sequential profile. -T px/py sets the position of the roTation pole of the projection. (Definition 3). -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. -W Width controls. Project only those points whose q coordinate is within w_min < q < w_max. -: Toggles between (longitude,latitude) and (latitude,longitude) input and/or output. [Default is (longitude,latitude)]. Append i to select input only or o to select output only. [Default affects both]. -bi Selects binary input. Append s for single precision [Default is d (double)]. Uppercase S or D will force byte-swapping. Optionally, append ncol, the number of columns in your binary input file if it exceeds the columns needed by the program. Or append c if the input file is netCDF. Optionally, append var1/var2/... to specify the variables to be read. [Default is 2 input columns]. -bo Selects binary output. Append s for single precision [Default is d (double)]. Uppercase S or D will force byte-swapping. Optionally, append ncol, the number of desired columns in your binary output file. [Default is given by -F or -G]. -f Special formatting of input and/or output columns (time or geographical data). Specify i or o to make this apply only to input or output [Default applies to both]. Give one or more columns (or column ranges) separated by commas. Append T (absolute calendar time), t (relative time in chosen TIME_UNIT since TIME_EPOCH), x (longitude), y (latitude), or f (floating point) to each column or column range item. Shorthand -f[i|o]g means -f[i|o]0x,1y (geographic coordinates). -m Multiple segment file(s). Segments are separated by a special record. For ASCII files the first character must be flag [Default is >]. For binary files all fields must be NaN and -b must set the number of output columns explicitly. By default the -m setting applies to both input and output. Use -mi and -mo to give separate settings to input and output.
The ASCII output formats of numerical data are controlled by parameters in your .gmtdefaults4 file. Longitude and latitude are formatted according to OUTPUT_DEGREE_FORMAT, whereas other values are formatted according to D_FORMAT. Be aware that the format in effect can lead to loss of precision in the output, which can lead to various problems downstream. If you find the output is not written with enough precision, consider switching to binary output (-bo if available) or specify more decimals using the D_FORMAT setting.
To generate points every 10km along a great circle from 10N,50W to 30N,10W:
project -C-50/10 -E-10/30 -G 10 -Q > great_circle_points.xyp
(Note that great_circle_points.xyp could now be used as input for grdtrack, 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:
project c2610.xygmb -C-30/-30 -A-20 -W-10000/0 -L-500/500 -F pz -Q > c2610_projected.pgmb
(Note in this example that -W-10000/0 is used to admit any value with a large negative q 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 x axis (p) makes an angle of 20 degrees with the old x axis, use:
project mydata.xy -C 5/3 -A 70 -F 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 (p = 0 line) through Tahiti, run:
project pacific.lonlat -T-75/68 -C-149:26/-17:37 -F pq > pacific.pq
Suppose that pacific_topo.grd is a grid file of bathymetry, and you want to make a file of flowlines in the hotspot reference frame. If you run:
grd2xyz pacific_topo.grd | project -T-75/68 -C 0/-90 -F xyq | xyz2grd -Retc -Ietc -C 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 px/py and 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 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 coordinates for an oblique small circle.
|GMT 4.5.14||PROJECT (1)||1 Nov 2015|