Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

grdfill.rst 2.7 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  1. .. index:: ! grdfill
  2. .. include:: module_core_purpose.rst_
  3. *******
  4. grdfill
  5. *******
  6. |grdfill_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt grdfill** *ingrid*
  11. |-A|\ *mode*\ [*arg*]
  12. |-G|\ *outgrid*
  13. [ |SYN_OPT-R| ]
  14. [ |-L|\ [**p**] ]
  15. [ |SYN_OPT-V| ]
  16. [ |SYN_OPT-f| ]
  17. [ |SYN_OPT--| ]
  18. |No-spaces|
  19. Description
  20. -----------
  21. **grdfill** reads a grid that presumably has unfilled holes that the user
  22. wants to fill in some fashion. Holes are identified by NaN values but
  23. this criteria can be changed. There are several different algorithms that
  24. can be used to replace the hole values.
  25. Required Arguments
  26. ------------------
  27. *ingrid*
  28. This is the input grid file.
  29. .. _-A:
  30. **-A**\ *mode*\ [*arg*]
  31. Specify the hole-filling algorithm to use. Choose from **c** for constant
  32. fill and append the constant value, **n** for nearest neighbor (and optionally
  33. append a search radius in pixels [default radius is :math:`r^2 = \sqrt{X^2 + Y^2}`,
  34. where (*X,Y*) are the node dimensions of the grid], or
  35. *s** for bicubic spline [NOT IMPLEMENTED YET].
  36. .. _-G:
  37. **-G**\ *outgrid*
  38. This is the output grid file.
  39. Optional Arguments
  40. ------------------
  41. .. _-N:
  42. **-N**\ [*nodata*]
  43. Sets the node value that identifies a point as a member of a hole [Default is NaN].
  44. .. _-R:
  45. .. |Add_-R| replace:: This defines the subregion to be cut out.
  46. .. include:: explain_-R.rst_
  47. .. _-L:
  48. **-L**\ [**p**]
  49. Just list the rectangular subregions west east south north of each hole.
  50. No grid fill takes place and **-G** is ignored. Optionally, append **p**
  51. to instead write closed polygons for all subregions.
  52. .. _-V:
  53. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  54. .. include:: explain_-V.rst_
  55. .. |Add_-f| unicode:: 0x20 .. just an invisible code
  56. .. include:: explain_-f.rst_
  57. .. include:: explain_help.rst_
  58. .. include:: explain_grd_coord.rst_
  59. Examples
  60. --------
  61. .. include:: explain_example.rst_
  62. To identify all regions with NaNs in the grid data.grd and create a listing of the
  63. bounding coordinates of rectangular regions that would cover these NaN areas, try
  64. ::
  65. gmt grdfill data.grd -L > wesn_listing.txt
  66. To identify the same areas but this time write a multisegment file with polygons
  67. corresponding to the rectangular subregions, use
  68. ::
  69. gmt grdfill data.grd -Lp > NaN_regions.txt
  70. To replace all NaN values in the file data.grd with the value 999.0, use
  71. ::
  72. gmt grdfill data.grd -Ac999 -Gno_NaNs_data.grd
  73. To replace all NaN values in the file data.grd with the values at the
  74. nearest non-NaN neighbor, try
  75. ::
  76. gmt grdfill data.grd -An -Gno_NaNs_NN_data.grd
  77. See Also
  78. --------
  79. :doc:`gmt`,
  80. :doc:`grdcut`,
  81. :doc:`grdclip`,
  82. :doc:`grdedit`,
  83. :doc:`grdinfo`
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...