| 434 | } |
| 435 | |
| 436 | static int usage (struct GMTAPI_CTRL *API, int level) { |
| 437 | const char *name = gmt_show_name_and_purpose (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_PURPOSE); |
| 438 | if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR); |
| 439 | GMT_Usage (API, 0, "usage: %s <table> %s %s %s [%s] [-C] [-D<template>] [-F[l|r]] [-G<fill>] %s[-L<grdfile>[+i|o]] [-N] " |
| 440 | "%s%s[-Q<min>] [-S%s] [-T] [%s] [%s] [%s] [%s] %s [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]\n", |
| 441 | name, GMT_I_OPT, GMT_J_OPT, GMT_Rgeoz_OPT, GMT_B_OPT, API->K_OPT, API->O_OPT, API->P_OPT, GMT_RADIUS_OPT, GMT_U_OPT, |
| 442 | GMT_V_OPT, GMT_X_OPT, GMT_Y_OPT, GMT_b_OPT, API->c_OPT, GMT_d_OPT, GMT_e_OPT, GMT_h_OPT, GMT_i_OPT, GMT_p_OPT, |
| 443 | GMT_qi_OPT, GMT_r_OPT, GMT_t_OPT, GMT_w_OPT, GMT_colon_OPT, GMT_PAR_OPT); |
| 444 | |
| 445 | if (level == GMT_SYNOPSIS) return (GMT_MODULE_SYNOPSIS); |
| 446 | |
| 447 | GMT_Message (API, GMT_TIME_NONE, " REQUIRED ARGUMENTS:\n"); |
| 448 | GMT_Option (API, "<,I,J-Z,R"); |
| 449 | GMT_Message (API, GMT_TIME_NONE, "\n OPTIONAL ARGUMENTS:\n"); |
| 450 | GMT_Option (API, "B-"); |
| 451 | GMT_Usage (API, 1, "\n-C Terminate existing clip-path. No other options required."); |
| 452 | GMT_Usage (API, 1, "\n-D<template>"); |
| 453 | GMT_Usage (API, -2, "Dump clip polygons as data polygons; no plotting takes place. " |
| 454 | "Append filename <template> which may contain a C-format specifier. " |
| 455 | "If no filename is given we write all polygons to standard output. " |
| 456 | "If filename has no specifiers then we write all polygons to a single file. " |
| 457 | "If an integer format (e.g., %%06d) is found we substitute a running segment count " |
| 458 | "and write all polygons to individual files; see module documentation for more examples."); |
| 459 | GMT_Usage (API, -2, "Note: Cannot be used with -T; see -Q to eliminate small polygons."); |
| 460 | GMT_Usage (API, 1, "\n-F[l|r]"); |
| 461 | GMT_Usage (API, -2, "Force clip contours to be oriented so that the higher z-values " |
| 462 | "are to the left (-Fl [Default]) or right (-Fr) as we move along " |
| 463 | "the contour lines [Default is not oriented]."); |
| 464 | gmt_fill_syntax (API->GMT, 'G', NULL, "Select fill color/pattern [Default is no fill]."); |
| 465 | GMT_Option (API, "K"); |
| 466 | GMT_Usage (API, 1, "\n-L<grdfile>[+i|o]"); |
| 467 | GMT_Usage (API, -2, "Save internal on/off grid to <grdfile> for testing [no grid saved]. Optionally, add a modifier:"); |
| 468 | GMT_Usage (API, 3, "+i Change inside nodes to NaNs."); |
| 469 | GMT_Usage (API, 3, "+o Change outside nodes to NaNs."); |
| 470 | GMT_Usage (API, 1, "\n-N Invert the sense of the clipping [or tiling]."); |
| 471 | GMT_Option (API, "O,P"); |
| 472 | GMT_Usage (API, 1, "\n-Q<min>"); |
| 473 | GMT_Usage (API, -2, "Do not dump contours with less than <min> points [Dump all contours]. " |
| 474 | "Note: Ignored unless -D is set."); |
| 475 | gmt_dist_syntax (API->GMT, "S" GMT_RADIUS_OPT, "Set search radius to identify inside points."); |
| 476 | GMT_Usage (API, -2, "Grid nodes inside circles of <radius> centered on the input " |
| 477 | "data points are considered to be reliable estimates of the surface. " |
| 478 | "Default is -S0, i.e., only the nearest node is considered reliable."); |
| 479 | GMT_Usage (API, 1, "\n-T Paint tiles [Default will trace data outline and set a clip path]. " |
| 480 | "Note: If set you must also specify a color/fill with -G."); |
| 481 | GMT_Option (API, "U,V,X,bi2,bo,c,d,e,h,i,p,qi,r,t,w,:,."); |
| 482 | |
| 483 | return (GMT_MODULE_USAGE); |
| 484 | } |
| 485 | |
| 486 | static int parse (struct GMT_CTRL *GMT, struct PSMASK_CTRL *Ctrl, struct GMT_OPTION *options) { |
| 487 | /* This parses the options provided to psmask and sets parameters in Ctrl. |
no test coverage detected