|
59 | 59 | #define THIS_MODULE_PURPOSE "Plot continents, countries, shorelines, rivers, and borders" |
60 | 60 | #define THIS_MODULE_KEYS ">?},>DE-lL" |
61 | 61 | #define THIS_MODULE_NEEDS "JR" |
62 | | -#define THIS_MODULE_OPTIONS "->BJKOPRUVXYbdptxy" GMT_OPT("Zc") |
| 62 | +#define THIS_MODULE_OPTIONS "->BJKOPRUVXYbdgptxy" GMT_OPT("Zc") |
63 | 63 |
|
64 | 64 | #define LAKE 0 |
65 | 65 | #define RIVER 1 |
@@ -199,10 +199,10 @@ static int usage (struct GMTAPI_CTRL *API, int level) { |
199 | 199 | if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR); |
200 | 200 | GMT_Usage (API, 0, "usage: %s %s %s [%s] [%s] [-C<fill>[+l|r]] [-D<resolution>[+f]] [-E%s] " |
201 | 201 | "[-G[<fill>]] [-F%s] [-I<feature>[/<pen>]] %s [-L%s] [-M] [-N<feature>[/<pen>]] %s%s[-Q] [-S[<fill>]] " |
202 | | - "[-Td%s] [-Tm%s] [%s] [%s] [-W[<feature>/][<pen>]] [%s] [%s] [%s] %s[%s] [%s] [%s] [%s]%s [%s]\n", |
| 202 | + "[-Td%s] [-Tm%s] [%s] [%s] [-W[<feature>/][<pen>]] [%s] [%s] [%s] [%s] %s[%s] [%s] [%s] [%s]%s [%s]\n", |
203 | 203 | name, GMT_J_OPT, GMT_Rgeoz_OPT, GMT_A_OPT, GMT_B_OPT, DCW_OPT, GMT_PANEL, API->K_OPT, GMT_SCALE, API->O_OPT, |
204 | 204 | API->P_OPT, GMT_TROSE_DIR, GMT_TROSE_MAG, GMT_U_OPT, GMT_V_OPT, GMT_X_OPT, GMT_Y_OPT, GMT_bo_OPT, API->c_OPT, |
205 | | - GMT_do_OPT, GMT_p_OPT, GMT_t_OPT, GMT_colon_OPT, dbg, GMT_PAR_OPT); |
| 205 | + GMT_do_OPT, GMT_g_OPT, GMT_p_OPT, GMT_t_OPT, GMT_colon_OPT, dbg, GMT_PAR_OPT); |
206 | 206 |
|
207 | 207 | if (level == GMT_SYNOPSIS) return (GMT_MODULE_SYNOPSIS); |
208 | 208 |
|
@@ -268,6 +268,9 @@ static int usage (struct GMTAPI_CTRL *API, int level) { |
268 | 268 | GMT_Usage (API, 3, "4: Lake in island in lake shores."); |
269 | 269 | GMT_Usage (API, -2, "Note: When feature-specific pens are used, those not set are deactivated."); |
270 | 270 | GMT_Option (API, "X,bo,c,do,p,t"); |
| 271 | + GMT_Usage (API, 1, "\n-gD<dist> Short version of the global -g option. Here it is used to set the distance, in map " |
| 272 | + "units, above which we consider to have a gap. Useful for the Spilhaus projection (though we automatically set it) " |
| 273 | + "and when line wrapping on dateline was not correctly detected."); |
271 | 274 | #ifdef DEBUG |
272 | 275 | GMT_Usage (API, 1, "\n-+<bin> (repeatable up to 16 times)"); |
273 | 276 | GMT_Usage (API, -2, "Plot only the specified bins (debug option)."); |
@@ -533,6 +536,14 @@ static int parse (struct GMT_CTRL *GMT, struct PSCOAST_CTRL *Ctrl, struct GMT_OP |
533 | 536 | } |
534 | 537 | } |
535 | 538 |
|
| 539 | + /* If Spilhaus projection and no -g used, set a default value. */ |
| 540 | + if (!GMT->common.g.active && GMT->current.proj.projection == GMT_PROJ4_SPILHAUS) { |
| 541 | + gmt_parse_g_option(GMT, "D1"); |
| 542 | + GMT->common.g.active = true; |
| 543 | + if (!((GMT->common.R.wesn[XHI] - GMT->common.R.wesn[XLO]) == 360 && GMT->common.R.wesn[YLO] == -90 && GMT->common.R.wesn[YHI] == 90)) |
| 544 | + GMT_Report(API, GMT_MSG_WARNING, "Using a non-global region with Spilhaus projection has unknown effects.\n"); |
| 545 | + } |
| 546 | + |
536 | 547 | if ((error = gmt_DCW_list (GMT, &(Ctrl->E.info)))) { /* This is either success or failure... */ |
537 | 548 | if (error != GMT_DCW_LIST) |
538 | 549 | return (1); /* Not good */ |
|
0 commit comments