Skip to content

Commit 02ac044

Browse files
author
Verstegen
committed
Split conda environment into two files, because one appeared to be too large for the virtual machines.
1 parent af02d56 commit 02ac044

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

index.Rmd

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,30 @@ mkdir data
4545
mkdir output
4646
```
4747

48-
Next, create a text file, (re)name it (to) `raster.yaml`, and copy the following content into the file:
48+
Like in the previous lesson, we will create a conda environment with one `.yaml` file, and then update it with a second `.yaml` file. Use the following content for the two files:
4949
```
5050
name: raster
51-
channels:
52-
- conda-forge
5351
dependencies:
5452
- python
5553
- numpy
5654
- matplotlib
5755
- spyder
5856
- owslib
5957
- gdal
60-
- rasterio
6158
- geopandas
59+
```
60+
61+
```
62+
name: raster
63+
channels:
64+
- conda-forge
65+
dependencies:
66+
- rasterio
6267
- rasterstats
6368
- affine
6469
```
6570

66-
Use this file to create an environment for this tutorial, as you have learned in the refresher lesson. NOTE: This can take a while (5-10 minutes); just go and get a coffee/tea/water/juice. Activate the environment, open Spyder, create a script in the root folder and start coding.
71+
Use these two files to create an environment for this tutorial. NOTE: The second one can take a while (5-10 minutes); just go and get a coffee/tea/water/juice. Finally, activate the environment, open Spyder, create a script in the root folder and start coding.
6772

6873

6974
## Reading raster data and accessing metadata

index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@
873873
<div class="contents col-xs-12 col-md-10">
874874
<h1 id="wur-geoscripting"><a href="https://geoscripting-wur.github.io/">WUR Geoscripting</a> <img src="https://www.wur.nl/upload/854757ab-168f-46d7-b415-f8b501eebaa5_WUR_RGB_standard_2021-site.svg" alt="WUR logo" style="height: 35px;"/></h1>
875875
<h1 id="week-3-lesson-10-handling-raster-data-with-python">Week 3, Lesson 10: Handling Raster data with Python</h1>
876-
<p><em>Jan Verbesselt, Jorge Mendes de Jesus, Aldo Bergsma, Dainius Masiliūnas, David Swinkels, Judith Verstegen, Corné Vreugdenhil</em> - 2022-01-09</p>
876+
<p><em>Jan Verbesselt, Jorge Mendes de Jesus, Aldo Bergsma, Dainius Masiliūnas, David Swinkels, Judith Verstegen, Corné Vreugdenhil</em> - 2022-01-17</p>
877877
<h2 id="introduction">Introduction</h2>
878878
<p>Today we will work with Python packages for spatial raster analysis. Python has some dedicated packages to handle rasters:</p>
879879
<ul>
@@ -902,22 +902,24 @@ <h2 id="setting-up-the-python-environment">Setting up the Python Environment</h2
902902
mkdir data
903903
mkdir output</code></pre>
904904
</div>
905-
<p>Next, create a text file, (re)name it (to) <code>raster.yaml</code>, and copy the following content into the file:</p>
905+
<p>Like in the previous lesson, we will create a conda environment with one <code>.yaml</code> file, and then update it with a second <code>.yaml</code> file. Use the following content for the two files:</p>
906906
<pre><code>name: raster
907-
channels:
908-
- conda-forge
909907
dependencies:
910908
- python
911909
- numpy
912910
- matplotlib
913911
- spyder
914912
- owslib
915913
- gdal
914+
- geopandas</code></pre>
915+
<pre><code>name: raster
916+
channels:
917+
- conda-forge
918+
dependencies:
916919
- rasterio
917-
- geopandas
918920
- rasterstats
919921
- affine</code></pre>
920-
<p>Use this file to create an environment for this tutorial, as you have learned in the refresher lesson. NOTE: This can take a while (5-10 minutes); just go and get a coffee/tea/water/juice. Activate the environment, open Spyder, create a script in the root folder and start coding.</p>
922+
<p>Use these two files to create an environment for this tutorial. NOTE: The second one can take a while (5-10 minutes); just go and get a coffee/tea/water/juice. Finally, activate the environment, open Spyder, create a script in the root folder and start coding.</p>
921923
<h2 id="reading-raster-data-and-accessing-metadata">Reading raster data and accessing metadata</h2>
922924
<h3 id="via-a-web-coverage-service">Via a Web Coverage Service</h3>
923925
<p>A Web Coverage Service (WCS) loads raster data in a similar way as Web Feature Services (WFS) load vector data. <a href="https://www.opengeospatial.org/standards/wcs">Web Coverage Services</a> are a standard by the Open Geospatial Consortium and allow the downloading of geospatial raster data with multiple types of format encoding: GeoTIFF, netCDF, JPEG2000 etc. A <a href="https://www.opengeospatial.org/standards/wms">Web Map Service</a> [WMS] also exists for rasters; it allows downloading of images but without the data values.</p>

0 commit comments

Comments
 (0)