1 /*--------------------------------------------------------------------
2  *
3  *	Copyright (c) 1991-2021 by the GMT Team (https://www.generic-mapping-tools.org/team.html)
4  *	See LICENSE.TXT file for copying and redistribution conditions.
5  *
6  *	This program is free software; you can redistribute it and/or modify
7  *	it under the terms of the GNU Lesser General Public License as published by
8  *	the Free Software Foundation; version 3 or any later version.
9  *
10  *	This program is distributed in the hope that it will be useful,
11  *	but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *	GNU Lesser General Public License for more details.
14  *
15  *	Contact info: www.generic-mapping-tools.org
16  *--------------------------------------------------------------------*/
17 /*
18  * Contains macros for presenting variations of GMT common options in program
19  * synopsis - yielding consistent presentation from all programs.
20  *
21  * Author:	Paul Wessel
22  * Date:	1-JAN-2010
23  * Version:	6 API
24  *
25  */
26 
27 /*!
28  * \file gmt_synopsis.h
29  * \brief Macros for presenting variations of GMT common options in program synopsis.
30  */
31 
32 #ifndef GMT_SYNOPSIS_H
33 #define GMT_SYNOPSIS_H
34 
35 /* Full syntax of input grids */
36 #define GMT_INGRID   "<ingrid>[=<ID>|?<varname>][+b<band>][+d<divisor>][+n<invalid>][+o<offset>][+s<scale>]"
37 /* Full syntax of output grids */
38 #define GMT_OUTGRID  "<outgrid>[=<ID>][+d<divisor>][+n<invalid>][+o<offset>|a][+s<scale>|a][:<driver>[/<dataType>][+c<options>]]"
39 
40 #define GMT_inc_OPT	"<xinc>[+e|n][/<yinc>[+e|n]]"
41 #define GMT_Id_OPT	"-I<xinc>[m|s][/<yinc>[m|s]]"
42 #define GMT_Jx_OPT	"-Jx|X<args>"
43 #define GMT_Jz_OPT	"-Jz|Z<args>"
44 #define GMT_Rgeo_OPT	"-R<west>/<east>/<south>/<north>[+r]"
45 #define GMT_Rgeoz_OPT	"-R<west>/<east>/<south>/<north>[/<zmin>/<zmax>][+r]"
46 #define GMT_Rx_OPT	"-R<xmin>/<xmax>/<ymin>/<ymax>[+r][+u<unit>]"
47 
48 /* Use b, h, when applies to both i and o, else use only the bi, bo variants */
49 
50 #define GMT_bi_OPT  "-bi<record>[+b|l]"
51 #define GMT_bo_OPT  "-bo<record>[+b|l]"
52 #define GMT_di_OPT	"-di<nodata>[+c<col>]"
53 #define GMT_do_OPT	"-do<nodata>[+c<col>]"
54 #define GMT_ho_OPT	"-ho[<nrecs>][+c][+d][+m<segheader>][+r<remark>][+t<title>]"
55 #define GMT_qi_OPT	"-qi[~]<rows>|<limits>[,...][+c<col>][+a|f|s]"
56 #define GMT_qo_OPT	"-qo[~]<rows>|<limits>[,...][+c<col>][+a|f|s]"
57 #define GMT_PAR_OPT	"--PAR=<value>"
58 
59 #ifdef GMT_MP_ENABLED
60 #define GMT_x_OPT	" [-x[[-]<n>]] "	/* Must add spaces and brackets here and place via %s since it may be blank */
61 #define GMT_ADD_x_OPT	"x"
62 #else	/* No Open-MP support */
63 #define GMT_x_OPT	" "
64 #define GMT_ADD_x_OPT	""
65 #endif
66 
67 /* For options needing a length or radius */
68 
69 #define GMT_DIST_OPT	"<dist>"
70 #define GMT_RADIUS_OPT	"<radius>"
71 
72 /* Options for map rose, scale and insert, used in pscoast and psbasemap */
73 
74 #define GMT_XYANCHOR	"[g|j|J|n|x]<refpoint>"
75 #define GMT_JUSTIFY	"[+j<justify>]"
76 #define GMT_OFFSET	"[+o<dx>[/<dy>]]"
77 #define GMT_TROSE_DIR	GMT_XYANCHOR "+w<width>[+f[<level>]]" GMT_JUSTIFY "[+l<w,e,s,n>]" GMT_OFFSET
78 #define GMT_TROSE_MAG	GMT_XYANCHOR "+w<width>[+d[<dec>[/<dlabel>]]][+i<pen>]" GMT_JUSTIFY "[+l<w,e,s,n>]" GMT_OFFSET "[+p<pen>][+t<ints>]"
79 #define GMT_SCALE	GMT_XYANCHOR "+w<length>[e|f|M|n|k|u][+a<align>][+c[[<slon>/]<slat>]][+f]" GMT_JUSTIFY "[+l[<label>]]" GMT_OFFSET "[+u]"
80 #define GMT_INSET_A	GMT_XYANCHOR "+w<width>[/<height>]" GMT_JUSTIFY GMT_OFFSET
81 #define GMT_INSET_B	"<xmin>/<xmax>/<ymin>/<ymax>[+r][+u<unit>]"
82 #define GMT_INSET_A_CL	GMT_XYANCHOR "+w<width>[/<height>]" GMT_JUSTIFY GMT_OFFSET "[+s<file>][+t]"
83 #define GMT_INSET_B_CL	"<xmin>/<xmax>/<ymin>/<ymax>[+r][+s<file>][+t][+u<unit>]"
84 
85 /* Options for background panel, used in gmtlogo, psimage, pslegend and psscale */
86 
87 #define GMT_PANEL	"[+c<clearance(s)>][+g<fill>][+i[[<gap>/]<pen>]][+p[<pen>]][+r[<radius>]][+s[<dx>/<dy>/][<fill>]]"
88 
89 /* Argument for segmentation option */
90 
91 #define GMT_SEGMENTIZE3	"[c|n|p][a|f|s|r|<refpoint>]"
92 #define GMT_SEGMENTIZE4	"[c|n|p|v][a|f|s|r|<refpoint>]"
93 
94 /* Argument to *contour programs */
95 
96 #define GMT_CONTG	"-G[d|f|l|L|n|x|X]<args>"
97 #define GMT_CONTT	"-T[h|l][+a][+d<gap>[c|i|p][/<length>[c|i|p]]][+l[<labels>]]"
98 
99 /* Arguments for psxy[z] polygon-creating option */
100 #define PLOT_L_OPT "-L[+b|d|D][+xl|r|x0][+yb|t|y0][+p<pen>]"
101 
102 /* Options for coastline extraction  */
103 #define GMT_A_OPT       "-A<min_area>[/<min_level>/<max_level>][+a[g|i][s|S]][+r|l][+p<percent>]"
104 
105 /* Used in tools that sets grdheader information via a -D option */
106 
107 #define GMT_GRDEDIT2D	"-D[+x<xname>][+y<yname>][+d<dname>][+s<scale>][+o<offset>][+n<invalid>][+t<title>][+r<remark>][+v<name>]"
108 #define GMT_GRDEDIT3D	"-D[+x<xname>][+y<yname>][+z<zname>][+d<dname>][+s<scale>][+o<offset>][+n<invalid>][+t<title>][+r<remark>][+v<name>]"
109 
110 /*! Macros for the common GMT options used in a program's usage synopsis */
111 
112 #define GMT_B_OPT	"-B<args>"
113 #define GMT_I_OPT   "-I" GMT_inc_OPT
114 #define GMT_J_OPT	"-J<args>"
115 #define GMT_R2_OPT	"-R<xmin>/<xmax>/<ymin>/<ymax>[+u<unit>][+r]"
116 #define GMT_R3_OPT	"-R<xmin>/<xmax>/<ymin>/<ymax>[/<zmin>/<zmax>][+u<unit>][+r]"
117 #define GMT_U_OPT	"-U[<label>][+c][+j<just>][+o<dx>[/<dy>]]"
118 #define GMT_V_OPT	"-V[q|e|w|t|i|c|d]"
119 #define GMT_X_OPT	"-X[a|c|f|r]<xshift>"
120 #define GMT_Y_OPT	"-Y[a|c|f|r]<yshift>"
121 #define GMT_a_OPT	"-a[[<col>=]<name>[,...]]"
122 #define GMT_b_OPT	"-b[i|o][<ncols>][<type>][w][+l|b]"
123 #define GMT_c0_OPT	"-c[<row>,<col>|<index>]"
124 #define GMT_d_OPT	"-d[i|o]<nodata>[+c<col>]"
125 #define GMT_e_OPT	"-e[~]<pattern>|/<regexp>/[i]|+f<file>"
126 #define GMT_f_OPT	"-f[i|o]<colinfo>"
127 #define GMT_g_OPT	"-gx|y|z|d|X|Y|D<gap>[<unit>][+a][+c<col>][+n|p]"
128 #define GMT_h_OPT	"-h[i|o][<nrecs>][+c][+d][+m<segheader>][+r<remark>][+t<title>]"
129 #define GMT_i_OPT	"-i<cols>[+l][+d<divisor>][+s<scale>|d|k][+o<offset>][,...][,t[<word>]]"
130 #define GMT_j_OPT	"-je|f|g"
131 #define GMT_l_OPT	"-l[<label>][+D<pen>][+G<gap>][+H<header>][+L[<code>/]<txt>][+N<cols>][+S<size>[/<height>]][+V[<pen>]][+f<font>][+g<fill>][+j<just>][+o<dx>[/<dy>]][+p<pen>][+s<scale>][+w<width>]"
132 #ifdef DEBUG
133 #define GMT_n_OPT	"-n[b|c|l|n][+A][+a][+b<BC>][+c][+t<threshold>]"
134 #else
135 #define GMT_n_OPT	"-n[b|c|l|n][+a][+b<BC>][+c][+t<threshold>]"
136 #endif
137 #define GMT_o_OPT	"-o<cols>[,...][,t[<word>]]"
138 #define GMT_q_OPT	"-q[i|o][~]<rows>[,...][+c<col>][+a|f|s]"
139 #define GMT_p_OPT	"-p[x|y|z]<azim>[/<elev>[/<zlevel>]][+w<lon0>/<lat0>[/<z0>]][+v<x0>/<y0>]"
140 #define GMT_r_OPT	"-r[g|p]"
141 #define GMT_s_OPT	"-s[<cols>][+a][+r]"
142 #define GMT_t_OPT	"-t<transp>[/<transp2>][+f|s]"
143 #define GMT_tv_OPT	"-t[<transp>[/<transp2>]][+f][+s]"
144 #define GMT_w_OPT	"-wy|a|w|d|h|m|s|c<period>[/<phase>][+c<col>]"
145 #define GMT_colon_OPT	"-:[i|o]"
146 
147 /*! Macro for tools that need to specify FFT information (prepend option flag, e.g., -N and put GMT_FFT_OPT inside [] ) */
148 
149 #define GMT_FFT_OPT "[a|f|m|r|s|<n_columns>/<n_rows>][+a|d|h|l][+e|m|n][+t<width>][+v][+w<suffix>][+z[p]]"
150 
151 #endif /* GMT_SYNOPSIS_H */
152