Skip to content

Commit

Permalink
A few changes
Browse files Browse the repository at this point in the history
Use factor instead of fact for clarity. Added missing +s description for -D documentation and added alias limits to range since latter is not good for PyGMT.

Rest looks fine to me.
  • Loading branch information
PaulWessel committed Nov 23, 2023
1 parent d7f4918 commit b91e6e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions doc/rst/source/gmtspatial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Synopsis
**gmt spatial** [ *table* ]
[ |-A|\ [**a**\ *min_dist*][*unit*]]
[ |-C| ]
[ |-D|\ [**+a**\ *amax*][**+c\|C**\ *cmax*][**+d**\ *dmax*][**+f**\ *file*][**+p**][**+s**\ *fact*] ]
[ |-D|\ [**+a**\ *amax*][**+c\|C**\ *cmax*][**+d**\ *dmax*][**+f**\ *file*][**+p**][**+s**\ *factor*] ]
[ |-E|\ **+p**\|\ **n** ]
[ |-F|\ [**l**] ]
[ |-I|\ [**e**\|\ **i**] ]
Expand Down Expand Up @@ -85,7 +85,7 @@ Optional Arguments

.. _-D:

**-D**\ [**+a**\ *amax*][**+c\|C**\ *cmax*][**+d**\ *dmax*][**+f**\ *file*][**+p**][**+s**\ *fact*]
**-D**\ [**+a**\ *amax*][**+c\|C**\ *cmax*][**+d**\ *dmax*][**+f**\ *file*][**+p**][**+s**\ *factor*]
Check for duplicates among the input lines or polygons, or, if
*file* is given via **+f**, check if the input features already
exist among the features in *file*. We consider the cases of exact
Expand All @@ -100,10 +100,10 @@ Optional Arguments
single letter Y (exact match) or ~ (approximate match). If the two
matching segments differ in length by more than a factor of 2 then
we consider the duplicate to be either a subset (-) or a superset
(+). Finally, we also note if two lines are the result of splitting
a continuous line across the Dateline (|).
For polygons we also consider the fractional difference in
areas; duplicates must differ by less than *amax* [0.01]. By
(+). Use **+s** to set another *factor* than 2. Finally, we also
note if two lines are the result of splitting a continuous line across
the Dateline (|). For polygons we also consider the fractional difference
in areas; duplicates must differ by less than *amax* [0.01]. By
default, we compute the mean line separation. Use **+C**\ *cmin* to
instead compute the median line separation and therefore a robust
closeness value. Also by default we consider all distances between
Expand Down
6 changes: 3 additions & 3 deletions src/gmtspatial.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ GMT_LOCAL struct NN_INFO *gmtspatial_NNA_update_info (struct GMT_CTRL *GMT, stru
static int usage (struct GMTAPI_CTRL *API, int level) {
const char *name = gmt_show_name_and_purpose (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_PURPOSE);
if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR);
GMT_Usage (API, 0, "usage: %s [<table>] [-A[a<min_dist>]] [-C] [-D[+a<amax>][+c|C<cmax>][+d<dmax>][+f<file>][+p][+s<sfact>]] [-E+n|p] "
GMT_Usage (API, 0, "usage: %s [<table>] [-A[a<min_dist>]] [-C] [-D[+a<amax>][+c|C<cmax>][+d<dmax>][+f<file>][+p][+s<factor>]] [-E+n|p] "
"[-F[l]] [-I[i|e]] [-L%s/<noise>/<offset>] [-N<pfile>[+a][+i][+p[<ID>]][+r][+z]] [-Q[<unit>][+c<min>[/<max>]][+h][+l][+p][+s[a|d]]] [%s] "
"[-Sb<width>|h|i|j|s|u] [-T[<cpol>]] [-W<dist>[<unit>][+f|l]] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]\n", name, GMT_DIST_OPT, GMT_Rgeo_OPT,
GMT_V_OPT, GMT_a_OPT, GMT_b_OPT, GMT_d_OPT, GMT_e_OPT, GMT_f_OPT, GMT_g_OPT, GMT_h_OPT, GMT_i_OPT, GMT_j_OPT, GMT_o_OPT, GMT_q_OPT, GMT_s_OPT, GMT_colon_OPT, GMT_PAR_OPT);
Expand All @@ -783,7 +783,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
"Considers 3rd column as z (if present) and 4th as w, if present [weight = 1].");
GMT_Usage (API, 1, "\n-C Clip polygons to the given region box (requires -R), possibly yielding new closed polygons. "
"For truncation instead (possibly yielding open polygons, i.e., lines), see -T.");
GMT_Usage (API, 1, "\n-D[+a<amax>][+c|C<cmax>][+d<dmax>][+f<file>][+p][+s<sfact>]");
GMT_Usage (API, 1, "\n-D[+a<amax>][+c|C<cmax>][+d<dmax>][+f<file>][+p][+s<factor>]");
GMT_Usage (API, -2, "Look for (near-)duplicate lines or polygons. Duplicate lines have a minimum point separation less than <dmax> and a closeness "
"ratio (mean separation/length) less than <cmax>. "
"If near-duplicates have lengths that differ by <sfact> or more then they are subsets or supersets. "
Expand All @@ -795,7 +795,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
GMT_Usage (API, 3, "+d Set minimum mean point separation [0].");
GMT_Usage (API, 3, "+f Compare <table> against <file> instead of itself.");
GMT_Usage (API, 3, "+p limit comparison to points that project perpendicularly on to the other line [all points].");
GMT_Usage (API, 3, "+s Set length ratio difference threshold [2].");
GMT_Usage (API, 3, "+s Set length ratio difference threshold factor [2].");
GMT_Usage (API, 1, "\n-E+n|p");
GMT_Usage (API, -2, "Orient all polygons to have the same handedness:");
GMT_Usage (API, 3, "+n Impose clockwise (negative) handedness.");
Expand Down
4 changes: 2 additions & 2 deletions src/longopt/gmtspatial_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static struct GMT_KEYWORD_DICTIONARY module_kw[] = {
{ 0, 'C', "clip", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'D', "duplicates",
"", "",
"a,c,C,d,f,p,s", "amax,cmax,cmin,dmax,file,perpendicular,fact",
"a,c,C,d,f,p,s", "amax,cmax,cmin,dmax,file,perpendicular,factor",
GMT_TP_STANDARD },
{ 0, 'E', "handedness",
"", "",
Expand All @@ -53,7 +53,7 @@ static struct GMT_KEYWORD_DICTIONARY module_kw[] = {
GMT_TP_STANDARD },
{ 0, 'Q', "centroid|area|length",
"", "",
"c,h,l,p,s", "range,header,lines,close,sort",
"c,h,l,p,s", "range|limits,header,lines,close,sort",
GMT_TP_STANDARD },
{ 0, 'S', "spatial",
"b,h,i,j,s,u", "buffer,hole,intersection,join,split,union",
Expand Down

0 comments on commit b91e6e4

Please sign in to comment.