This file is indexed.

/usr/share/doc/python-pyresample-doc/html/grid.html is in python-pyresample-doc 1.1.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Resampling of gridded data &mdash; pyresample 1.1.6 documentation</title>
    
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.1.6',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="pyresample 1.1.6 documentation" href="index.html" />
    <link rel="next" title="Resampling of swath data" href="swath.html" />
    <link rel="prev" title="Geographic filtering" href="geo_filter.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="swath.html" title="Resampling of swath data"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="geo_filter.html" title="Geographic filtering"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">pyresample 1.1.6 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="resampling-of-gridded-data">
<h1>Resampling of gridded data<a class="headerlink" href="#resampling-of-gridded-data" title="Permalink to this headline"></a></h1>
<p>Pyresample can be used to resample from an existing grid to another. Nearest neighbour resampling is used.</p>
<div class="section" id="pyresample-image">
<h2>pyresample.image<a class="headerlink" href="#pyresample-image" title="Permalink to this headline"></a></h2>
<p>A grid can be stored in an object of type <strong>ImageContainer</strong> along with its area definition.
An object of type <strong>ImageContainer</strong> allows for calculating resampling using preprocessed arrays
using the method <strong>get_array_from_linesample</strong></p>
<p>Resampling can be done using descendants of <strong>ImageContainer</strong> and calling their <strong>resample</strong> method.</p>
<p>An <strong>ImageContainerQuick</strong> object allows for the grid to be resampled to a new area defintion
using an approximate (but fast) nearest neighbour method.
Resampling an object of type <strong>ImageContainerQuick</strong> returns a new object of type <strong>ImageContainerQuick</strong>.</p>
<p>An <strong>ImageContainerNearest</strong> object allows for the grid to be resampled to a new area defintion (or swath definition)
using an accurate kd-tree method.
Resampling an object of type <strong>ImageContainerNearest</strong> returns a new object of
type <strong>ImageContainerNearest</strong>.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">pyresample</span> <span class="kn">import</span> <span class="n">image</span><span class="p">,</span> <span class="n">geometry</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">area_def</span> <span class="o">=</span> <span class="n">geometry</span><span class="o">.</span><span class="n">AreaDefinition</span><span class="p">(</span><span class="s1">&#39;areaD&#39;</span><span class="p">,</span> <span class="s1">&#39;Europe (3km, HRV, VTC)&#39;</span><span class="p">,</span> <span class="s1">&#39;areaD&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">{</span><span class="s1">&#39;a&#39;</span><span class="p">:</span> <span class="s1">&#39;6378144.0&#39;</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="s1">&#39;6356759.0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;lat_0&#39;</span><span class="p">:</span> <span class="s1">&#39;50.00&#39;</span><span class="p">,</span> <span class="s1">&#39;lat_ts&#39;</span><span class="p">:</span> <span class="s1">&#39;50.00&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;lon_0&#39;</span><span class="p">:</span> <span class="s1">&#39;8.00&#39;</span><span class="p">,</span> <span class="s1">&#39;proj&#39;</span><span class="p">:</span> <span class="s1">&#39;stere&#39;</span><span class="p">},</span>
<span class="gp">... </span>                               <span class="mi">800</span><span class="p">,</span> <span class="mi">800</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">[</span><span class="o">-</span><span class="mf">1370912.72</span><span class="p">,</span> <span class="o">-</span><span class="mf">909968.64</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="mf">1029087.28</span><span class="p">,</span> <span class="mf">1490031.36</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_area</span> <span class="o">=</span> <span class="n">geometry</span><span class="o">.</span><span class="n">AreaDefinition</span><span class="p">(</span><span class="s1">&#39;msg_full&#39;</span><span class="p">,</span> <span class="s1">&#39;Full globe MSG image 0 degrees&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="s1">&#39;msg_full&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">{</span><span class="s1">&#39;a&#39;</span><span class="p">:</span> <span class="s1">&#39;6378169.0&#39;</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="s1">&#39;6356584.0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;h&#39;</span><span class="p">:</span> <span class="s1">&#39;35785831.0&#39;</span><span class="p">,</span> <span class="s1">&#39;lon_0&#39;</span><span class="p">:</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;proj&#39;</span><span class="p">:</span> <span class="s1">&#39;geos&#39;</span><span class="p">},</span>
<span class="gp">... </span>                               <span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">[</span><span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="mf">5568742.4</span><span class="p">,</span> <span class="mf">5568742.4</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_quick</span> <span class="o">=</span> <span class="n">image</span><span class="o">.</span><span class="n">ImageContainerQuick</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">msg_area</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">area_con_quick</span> <span class="o">=</span> <span class="n">msg_con_quick</span><span class="o">.</span><span class="n">resample</span><span class="p">(</span><span class="n">area_def</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">result_data_quick</span> <span class="o">=</span> <span class="n">area_con_quick</span><span class="o">.</span><span class="n">image_data</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_nn</span> <span class="o">=</span> <span class="n">image</span><span class="o">.</span><span class="n">ImageContainerNearest</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">msg_area</span><span class="p">,</span> <span class="n">radius_of_influence</span><span class="o">=</span><span class="mi">50000</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">area_con_nn</span> <span class="o">=</span> <span class="n">msg_con_nn</span><span class="o">.</span><span class="n">resample</span><span class="p">(</span><span class="n">area_def</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">result_data_nn</span> <span class="o">=</span> <span class="n">area_con_nn</span><span class="o">.</span><span class="n">image_data</span>
</pre></div>
</div>
<p>Data is assumed to be a numpy array of shape (rows, cols) or (rows, cols, channels).</p>
<p>Masked arrays can be used as data input. In order to have undefined pixels masked out instead of
assigned a fill value set <strong>fill_value=None</strong> when calling <strong>resample_area_*</strong>.</p>
<p>Using <strong>ImageContainerQuick</strong> the risk of image artifacts increases as the distance
from source projection center increases.</p>
<p>The constructor argument <strong>radius_of_influence</strong> to <strong>ImageContainerNearest</strong> specifices the maximum
distance to search for a neighbour for each point in the target grid. The unit is meters.</p>
<p>The constructor arguments of an ImageContainer object can be changed as attributes later</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">pyresample</span> <span class="kn">import</span> <span class="n">image</span><span class="p">,</span> <span class="n">geometry</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_area</span> <span class="o">=</span> <span class="n">geometry</span><span class="o">.</span><span class="n">AreaDefinition</span><span class="p">(</span><span class="s1">&#39;msg_full&#39;</span><span class="p">,</span> <span class="s1">&#39;Full globe MSG image 0 degrees&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="s1">&#39;msg_full&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">{</span><span class="s1">&#39;a&#39;</span><span class="p">:</span> <span class="s1">&#39;6378169.0&#39;</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="s1">&#39;6356584.0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;h&#39;</span><span class="p">:</span> <span class="s1">&#39;35785831.0&#39;</span><span class="p">,</span> <span class="s1">&#39;lon_0&#39;</span><span class="p">:</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;proj&#39;</span><span class="p">:</span> <span class="s1">&#39;geos&#39;</span><span class="p">},</span>
<span class="gp">... </span>                               <span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">[</span><span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="mf">5568742.4</span><span class="p">,</span> <span class="mf">5568742.4</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_nn</span> <span class="o">=</span> <span class="n">image</span><span class="o">.</span><span class="n">ImageContainerNearest</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">msg_area</span><span class="p">,</span> <span class="n">radius_of_influence</span><span class="o">=</span><span class="mi">50000</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_nn</span><span class="o">.</span><span class="n">radius_of_influence</span> <span class="o">=</span> <span class="mi">45000</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_nn</span><span class="o">.</span><span class="n">fill_value</span> <span class="o">=</span> <span class="o">-</span><span class="mi">99</span>
</pre></div>
</div>
<div class="section" id="multi-channel-images">
<h3>Multi channel images<a class="headerlink" href="#multi-channel-images" title="Permalink to this headline"></a></h3>
<p>If the dataset has several channels the last index of the data array specifies the channels</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">pyresample</span> <span class="kn">import</span> <span class="n">image</span><span class="p">,</span> <span class="n">geometry</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_area</span> <span class="o">=</span> <span class="n">geometry</span><span class="o">.</span><span class="n">AreaDefinition</span><span class="p">(</span><span class="s1">&#39;msg_full&#39;</span><span class="p">,</span> <span class="s1">&#39;Full globe MSG image 0 degrees&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="s1">&#39;msg_full&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">{</span><span class="s1">&#39;a&#39;</span><span class="p">:</span> <span class="s1">&#39;6378169.0&#39;</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="s1">&#39;6356584.0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;h&#39;</span><span class="p">:</span> <span class="s1">&#39;35785831.0&#39;</span><span class="p">,</span> <span class="s1">&#39;lon_0&#39;</span><span class="p">:</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;proj&#39;</span><span class="p">:</span> <span class="s1">&#39;geos&#39;</span><span class="p">},</span>
<span class="gp">... </span>                               <span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">[</span><span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="mf">5568742.4</span><span class="p">,</span> <span class="mf">5568742.4</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">channel1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">channel2</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">))</span> <span class="o">*</span> <span class="mi">2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">channel3</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">))</span> <span class="o">*</span> <span class="mi">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dstack</span><span class="p">((</span><span class="n">channel1</span><span class="p">,</span> <span class="n">channel2</span><span class="p">,</span> <span class="n">channel3</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_nn</span> <span class="o">=</span> <span class="n">image</span><span class="o">.</span><span class="n">ImageContainerNearest</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">msg_area</span><span class="p">,</span> <span class="n">radius_of_influence</span><span class="o">=</span><span class="mi">50000</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="segmented-resampling">
<h3>Segmented resampling<a class="headerlink" href="#segmented-resampling" title="Permalink to this headline"></a></h3>
<p>Pyresample calculates the result in segments in order to reduce memory footprint. This is controlled by the <strong>segments</strong> contructor keyword argument. If no <strong>segments</strong> argument is given pyresample will estimate the number of segments to use.</p>
<p>Forcing quick resampling to use 4 resampling segments:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">pyresample</span> <span class="kn">import</span> <span class="n">image</span><span class="p">,</span> <span class="n">geometry</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">area_def</span> <span class="o">=</span> <span class="n">geometry</span><span class="o">.</span><span class="n">AreaDefinition</span><span class="p">(</span><span class="s1">&#39;areaD&#39;</span><span class="p">,</span> <span class="s1">&#39;Europe (3km, HRV, VTC)&#39;</span><span class="p">,</span> <span class="s1">&#39;areaD&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">{</span><span class="s1">&#39;a&#39;</span><span class="p">:</span> <span class="s1">&#39;6378144.0&#39;</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="s1">&#39;6356759.0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;lat_0&#39;</span><span class="p">:</span> <span class="s1">&#39;50.00&#39;</span><span class="p">,</span> <span class="s1">&#39;lat_ts&#39;</span><span class="p">:</span> <span class="s1">&#39;50.00&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;lon_0&#39;</span><span class="p">:</span> <span class="s1">&#39;8.00&#39;</span><span class="p">,</span> <span class="s1">&#39;proj&#39;</span><span class="p">:</span> <span class="s1">&#39;stere&#39;</span><span class="p">},</span>
<span class="gp">... </span>                               <span class="mi">800</span><span class="p">,</span> <span class="mi">800</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">[</span><span class="o">-</span><span class="mf">1370912.72</span><span class="p">,</span> <span class="o">-</span><span class="mf">909968.64</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="mf">1029087.28</span><span class="p">,</span> <span class="mf">1490031.36</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_area</span> <span class="o">=</span> <span class="n">geometry</span><span class="o">.</span><span class="n">AreaDefinition</span><span class="p">(</span><span class="s1">&#39;msg_full&#39;</span><span class="p">,</span> <span class="s1">&#39;Full globe MSG image 0 degrees&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="s1">&#39;msg_full&#39;</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">{</span><span class="s1">&#39;a&#39;</span><span class="p">:</span> <span class="s1">&#39;6378169.0&#39;</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="s1">&#39;6356584.0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;h&#39;</span><span class="p">:</span> <span class="s1">&#39;35785831.0&#39;</span><span class="p">,</span> <span class="s1">&#39;lon_0&#39;</span><span class="p">:</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="s1">&#39;proj&#39;</span><span class="p">:</span> <span class="s1">&#39;geos&#39;</span><span class="p">},</span>
<span class="gp">... </span>                               <span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">,</span>
<span class="gp">... </span>                               <span class="p">[</span><span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">5568742.4</span><span class="p">,</span>
<span class="gp">... </span>                                <span class="mf">5568742.4</span><span class="p">,</span> <span class="mf">5568742.4</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="mi">3712</span><span class="p">,</span> <span class="mi">3712</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">msg_con_quick</span> <span class="o">=</span> <span class="n">image</span><span class="o">.</span><span class="n">ImageContainerQuick</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">msg_area</span><span class="p">,</span> <span class="n">segments</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">area_con_quick</span> <span class="o">=</span> <span class="n">msg_con_quick</span><span class="o">.</span><span class="n">resample</span><span class="p">(</span><span class="n">area_def</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="constructor-arguments">
<h3>Constructor arguments<a class="headerlink" href="#constructor-arguments" title="Permalink to this headline"></a></h3>
<p>The full list of constructor arguments:</p>
<blockquote>
<div><strong>ImageContainerQuick</strong>:</div></blockquote>
<ul class="simple">
<li>image_data : Dataset. Masked arrays can be used.</li>
<li>image_data : Geometry definition.</li>
<li>fill_value (optional) : Fill value for undefined pixels. Defaults to 0. If set to <strong>None</strong> they will be masked out.</li>
<li>nprocs (optional) : Number of processor cores to use. Defaults to 1.</li>
<li>segments (optional) : Number of segments to split resampling in. Defaults to auto estimation.</li>
</ul>
<blockquote>
<div><strong>ImageContainerNearest</strong>:</div></blockquote>
<ul class="simple">
<li>image_data : Dataset. Masked arrays can be used.</li>
<li>image_data : Geometry definition.</li>
<li>radius_of_influence : Cut off radius in meters when considering neighbour pixels.</li>
<li>epsilon (optional) : The distance to a found value is guaranteed to be no further than (1 + eps) times the distance to the correct neighbour.</li>
<li>fill_value (optional) : Fill value for undefined pixels. Defaults to 0. If set to <strong>None</strong> they will be masked out.</li>
<li>reduce_data (optional) : Apply geographic reduction of dataset before resampling. Defaults to True</li>
<li>nprocs (optional) : Number of processor cores to use. Defaults to 1.</li>
<li>segments (optional) : Number of segments to split resampling in. Defaults to auto estimation.</li>
</ul>
</div>
<div class="section" id="preprocessing-of-grid-resampling">
<h3>Preprocessing of grid resampling<a class="headerlink" href="#preprocessing-of-grid-resampling" title="Permalink to this headline"></a></h3>
<p>For preprocessing of grid resampling see <a class="reference internal" href="preproc.html#preproc"><span>Preprocessing of grids</span></a></p>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Resampling of gridded data</a><ul>
<li><a class="reference internal" href="#pyresample-image">pyresample.image</a><ul>
<li><a class="reference internal" href="#multi-channel-images">Multi channel images</a></li>
<li><a class="reference internal" href="#segmented-resampling">Segmented resampling</a></li>
<li><a class="reference internal" href="#constructor-arguments">Constructor arguments</a></li>
<li><a class="reference internal" href="#preprocessing-of-grid-resampling">Preprocessing of grid resampling</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="geo_filter.html"
                        title="previous chapter">Geographic filtering</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="swath.html"
                        title="next chapter">Resampling of swath data</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/grid.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="swath.html" title="Resampling of swath data"
             >next</a> |</li>
        <li class="right" >
          <a href="geo_filter.html" title="Geographic filtering"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">pyresample 1.1.6 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &copy; Copyright 2013, Esben S. Nielsen.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.6.
    </div>
  </body>
</html>