Skip to content

Commit

Permalink
Deploying to gh-pages from @ 76a63aa 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed May 29, 2024
1 parent ababcc5 commit 39f6aa1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion _modules/geefcc/sum_raster_bands.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h1>Source code for geefcc.sum_raster_bands</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">osgeo</span> <span class="kn">import</span> <span class="n">gdal</span>

<span class="kn">from</span> <span class="nn">.misc.miscellaneous</span> <span class="kn">import</span> <span class="n">progress_bar</span><span class="p">,</span> <span class="n">makeblock</span>
<span class="kn">from</span> <span class="nn">.misc</span> <span class="kn">import</span> <span class="n">progress_bar</span><span class="p">,</span> <span class="n">makeblock</span>


<div class="viewcode-block" id="sum_raster_bands">
Expand Down
7 changes: 3 additions & 4 deletions _sources/notebooks/large_countries/large_countries.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ We initialize Google Earth Engine.
# Initialize GEE
ee.Initialize(project="forestatrisk",
opt_url="https://earthengine-highvolume.googleapis.com")
opt_url=("https://earthengine-highvolume."
"googleapis.com"))
We can compute the number of cores used for the computation.

Expand Down Expand Up @@ -73,7 +74,7 @@ We estimate the computation time to download 159 1-degree tiles using several co
::

Execution time: 20.15 minutes
Execution time: 30.76 minutes

Transform multiband fcc raster in one band raster
-------------------------------------------------
Expand All @@ -90,8 +91,6 @@ We resample at a lower resolution for plotting.

.. code:: python
from osgeo import gdal
infn = "out_tmf/fcc_tmf.tif"
outfn = "out_tmf/fcc_tmf_coarsen.tif"
scale = gdal.Open(infn).GetGeoTransform()[1]
Expand Down
9 changes: 4 additions & 5 deletions notebooks/large_countries/large_countries.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ <h2>Download the data from GEE<a class="headerlink" href="#download-the-data-fro
<p>We initialize Google Earth Engine.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Initialize GEE</span>
<span class="n">ee</span><span class="o">.</span><span class="n">Initialize</span><span class="p">(</span><span class="n">project</span><span class="o">=</span><span class="s2">&quot;forestatrisk&quot;</span><span class="p">,</span>
<span class="n">opt_url</span><span class="o">=</span><span class="s2">&quot;https://earthengine-highvolume.googleapis.com&quot;</span><span class="p">)</span>
<span class="n">opt_url</span><span class="o">=</span><span class="p">(</span><span class="s2">&quot;https://earthengine-highvolume.&quot;</span>
<span class="s2">&quot;googleapis.com&quot;</span><span class="p">))</span>
</pre></div>
</div>
<p>We can compute the number of cores used for the computation.</p>
Expand Down Expand Up @@ -160,7 +161,7 @@ <h2>Download the data from GEE<a class="headerlink" href="#download-the-data-fro
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Execution time:&#39;</span><span class="p">,</span> <span class="nb">round</span><span class="p">(</span><span class="n">elapsed_time</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="s1">&#39;minutes&#39;</span><span class="p">)</span>
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Execution</span> <span class="n">time</span><span class="p">:</span> <span class="mf">20.15</span> <span class="n">minutes</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Execution</span> <span class="n">time</span><span class="p">:</span> <span class="mf">30.76</span> <span class="n">minutes</span>
</pre></div>
</div>
</section>
Expand All @@ -173,9 +174,7 @@ <h2>Transform multiband fcc raster in one band raster<a class="headerlink" href=
</pre></div>
</div>
<p>We resample at a lower resolution for plotting.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">osgeo</span> <span class="kn">import</span> <span class="n">gdal</span>

<span class="n">infn</span> <span class="o">=</span> <span class="s2">&quot;out_tmf/fcc_tmf.tif&quot;</span>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">infn</span> <span class="o">=</span> <span class="s2">&quot;out_tmf/fcc_tmf.tif&quot;</span>
<span class="n">outfn</span> <span class="o">=</span> <span class="s2">&quot;out_tmf/fcc_tmf_coarsen.tif&quot;</span>
<span class="n">scale</span> <span class="o">=</span> <span class="n">gdal</span><span class="o">.</span><span class="n">Open</span><span class="p">(</span><span class="n">infn</span><span class="p">)</span><span class="o">.</span><span class="n">GetGeoTransform</span><span class="p">()[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">xres</span> <span class="o">=</span> <span class="mi">20</span> <span class="o">*</span> <span class="n">scale</span>
Expand Down
Loading

0 comments on commit 39f6aa1

Please sign in to comment.