Skip to content

Commit 2fbd1ff

Browse files
authored
grdfilter: Improve the documentation for the -D option (#8898)
1 parent a1d6cdf commit 2fbd1ff

1 file changed

Lines changed: 17 additions & 21 deletions

File tree

doc/rst/source/grdfilter.rst

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,23 @@ Required Arguments
5252
.. _-D:
5353

5454
**-D**\ *flag*
55-
Distance *flag* tells how grid (*x, y*) relates to filter *width* as
56-
follows:
57-
58-
- *flag* = p: grid (px,py) with *width* an odd number of pixels;
59-
Cartesian distances.
60-
- *flag* = 0: grid (*x, y*) same units as *width*, Cartesian distances.
61-
- *flag* = 1: grid (*x, y*) in degrees, *width* in km, Cartesian
62-
distances.
63-
- *flag* = 2: grid (*x, y*) in degrees, *width* in km, dx scaled by
64-
cos(middle y), Cartesian distances.
65-
66-
The above options are fastest because they allow weight matrix to be
67-
computed only once. The next three options are slower because they
68-
recompute weights for each latitude.
69-
70-
- *flag* = 3: grid (*x, y*) in degrees, *width* in km, dx scaled by
71-
cosine(y), Cartesian distance calculation.
72-
- *flag* = 4: grid (*x, y*) in degrees, *width* in km, Spherical distance
73-
calculation.
74-
- *flag* = 5: grid (*x, y*) in Mercator **-Jm**\ 1 img units, *width* in
75-
km, Spherical distance calculation.
55+
Distance *flag* tells how grid (*x, y*) relates to filter *width* as follows:
56+
57+
====== =========================== ===================== =======================================
58+
Flag Grid (x,y) Width Distance Calculation
59+
====== =========================== ===================== =======================================
60+
**p** Pixels (px, py) Odd number of pixels Cartesian
61+
**0** Same units as *width* Any Cartesian
62+
**1** Degrees km Cartesian
63+
**2** Degrees km Cartesian, dx scaled by cos(middle y)
64+
**3** Degrees km Cartesian, dx scaled by cos(y) per row
65+
**4** Degrees km Spherical (great circle)
66+
**5** Mercator **-Jm1** img units km Spherical
67+
====== =========================== ===================== =======================================
68+
69+
Flags **p**, **0**, **1**, and **2** are fastest because they allow weight matrix to
70+
be computed only once. The other flags are slower because they recompute weights for
71+
each latitude.
7672

7773
.. _-F:
7874

0 commit comments

Comments
 (0)