Skip to content

Commit

Permalink
Split conda environment into two files, because one appeared to be to…
Browse files Browse the repository at this point in the history
…o large for the virtual machines.
  • Loading branch information
Verstegen committed Jan 17, 2022
1 parent af02d56 commit 02ac044
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
15 changes: 10 additions & 5 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,30 @@ mkdir data
mkdir output
```

Next, create a text file, (re)name it (to) `raster.yaml`, and copy the following content into the file:
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:
```
name: raster
channels:
- conda-forge
dependencies:
- python
- numpy
- matplotlib
- spyder
- owslib
- gdal
- rasterio
- geopandas
```

```
name: raster
channels:
- conda-forge
dependencies:
- rasterio
- rasterstats
- affine
```

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.
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.


## Reading raster data and accessing metadata
Expand Down
14 changes: 8 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@
<div class="contents col-xs-12 col-md-10">
<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>
<h1 id="week-3-lesson-10-handling-raster-data-with-python">Week 3, Lesson 10: Handling Raster data with Python</h1>
<p><em>Jan Verbesselt, Jorge Mendes de Jesus, Aldo Bergsma, Dainius Masiliūnas, David Swinkels, Judith Verstegen, Corné Vreugdenhil</em> - 2022-01-09</p>
<p><em>Jan Verbesselt, Jorge Mendes de Jesus, Aldo Bergsma, Dainius Masiliūnas, David Swinkels, Judith Verstegen, Corné Vreugdenhil</em> - 2022-01-17</p>
<h2 id="introduction">Introduction</h2>
<p>Today we will work with Python packages for spatial raster analysis. Python has some dedicated packages to handle rasters:</p>
<ul>
Expand Down Expand Up @@ -902,22 +902,24 @@ <h2 id="setting-up-the-python-environment">Setting up the Python Environment</h2
mkdir data
mkdir output</code></pre>
</div>
<p>Next, create a text file, (re)name it (to) <code>raster.yaml</code>, and copy the following content into the file:</p>
<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>
<pre><code>name: raster
channels:
- conda-forge
dependencies:
- python
- numpy
- matplotlib
- spyder
- owslib
- gdal
- geopandas</code></pre>
<pre><code>name: raster
channels:
- conda-forge
dependencies:
- rasterio
- geopandas
- rasterstats
- affine</code></pre>
<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>
<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>
<h2 id="reading-raster-data-and-accessing-metadata">Reading raster data and accessing metadata</h2>
<h3 id="via-a-web-coverage-service">Via a Web Coverage Service</h3>
<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>
Expand Down

0 comments on commit 02ac044

Please sign in to comment.