Skip to content

Commit

Permalink
Deploy commit: Merge pull request #783 from Robinlovelace/bullet-poin…
Browse files Browse the repository at this point in the history
…t-colon-consistency

Update with consistent bullet points/colons c2b347c
  • Loading branch information
Nowosad committed Apr 25, 2022
1 parent 91676d4 commit bee2e47
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 54 deletions.
21 changes: 11 additions & 10 deletions 05-geometry-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,17 +792,18 @@ In short, this process takes the values of our original raster and recalculates



Several methods for recalculating (estimating) values for a raster with different resolutions/origins exist (Figure \@ref(fig:resampl)).
It includes:

- Nearest neighbor - assigns the value of the nearest cell of the original raster to the cell of the target one.
It is fast and usually suitable for categorical rasters
- Bilinear interpolation - assigns a weighted average of the four nearest cells from the original raster to the cell of the target one (Figure \@ref(fig:bilinear)). The fastest method for continuous rasters
- Cubic interpolation - uses values of 16 nearest cells of the original raster to determine the output cell value, applying third-order polynomial functions. Used for continuous rasters. It results in a more smoothed surface than the bilinear interpolation, but is also more computationally demanding
- Cubic spline interpolation - also uses values of 16 nearest cells of the original raster to determine the output cell value, but applies cubic splines (piecewise third-order polynomial functions) to derive the results. Used for continuous rasters
- Lanczos windowed sinc resampling - uses values of 36 nearest cells of the original raster to determine the output cell value. Used for continuous rasters^[More detailed explanation of this method can be found at https://gis.stackexchange.com/a/14361/20955.]
There are several methods for estimating values for a raster with different resolutions/origins, as shown in Figure \@ref(fig:resampl).
These resampling methods include:

- Nearest neighbor: assigns the value of the nearest cell of the original raster to the cell of the target one. This is a fast simple technique that is usually suitable for resampling categorical rasters.
- Bilinear interpolation: assigns a weighted average of the four nearest cells from the original raster to the cell of the target one (Figure \@ref(fig:bilinear)). This is the fastest method that is appropriate for continuous rasters.
- Cubic interpolation: uses values of 16 nearest cells of the original raster to determine the output cell value, applying third-order polynomial functions. Used for continuous rasters and results in a smoother surface that results bilinear interpolation, but is more computationally intensive.
- Cubic spline interpolation: also uses values of 16 nearest cells of the original raster to determine output cell, but applies cubic splines (piecewise third-order polynomial functions) to derive the results. Used for continuous rasters.
- Lanczos windowed sinc resampling: uses values of 36 nearest cells of the original raster to determine the output cell value. Used for continuous rasters.^[
More detailed explanation of this method can be found at https://gis.stackexchange.com/a/14361/20955.
]

As you can find in the above explanation, only *nearest neighbor* is suitable for categorical rasters, while all the methods can be used (with different outcomes) for the continuous rasters.
The above explanation highlights that only *nearest neighbor* resampling is suitable for categorical rasters, while all the methods can be used (with different outcomes) for continuous rasters.
Additionally, each successive method requires more processing time.

To apply resampling, the **terra** package provides a `resample()` function.
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 05-geometry-operations_files/figure-html/points-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 09-mapping_files/figure-html/layout3-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 09-mapping_files/figure-html/tmstyles-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions 12-spatial-cv.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ The first three rows of `lsl`, rounded to two significant digits, can be found i
To model landslide susceptibility, we need some predictors.
Since terrain attributes are frequently associated with landsliding [@muenchow_geomorphic_2012], we have already extracted following terrain attributes from `ta` to `lsl`:

- `slope` - slope angle (°)
- `cplan` - plan curvature (rad m^−1^) expressing the convergence or divergence of a slope and thus water flow
- `cprof` - profile curvature (rad m^-1^) as a measure of flow acceleration, also known as downslope change in slope angle
- `elev` - elevation (m a.s.l.) as the representation of different altitudinal zones of vegetation and precipitation in the study area
- `log10_carea` - the decadic logarithm of the catchment area (log10 m^2^) representing the amount of water flowing towards a location
- `slope`: slope angle (°)
- `cplan`: plan curvature (rad m^−1^) expressing the convergence or divergence of a slope and thus water flow
- `cprof`: profile curvature (rad m^-1^) as a measure of flow acceleration, also known as downslope change in slope angle
- `elev`: elevation (m a.s.l.) as the representation of different altitudinal zones of vegetation and precipitation in the study area
- `log10_carea`: the decadic logarithm of the catchment area (log10 m^2^) representing the amount of water flowing towards a location

It might be a worthwhile exercise to compute the terrain attributes with the help of R-GIS bridges (see Chapter \@ref(gis)) and extract them to the landslide points (see Exercise section at the end of this Chapter).

Expand Down
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion adv-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion algorithms.html
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion attr.html
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion conclusion.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion eco.html
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion foreword-1st-edition.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
20 changes: 10 additions & 10 deletions geometric-operations.html
Original file line number Diff line number Diff line change
Expand Up @@ -886,18 +886,18 @@ <h3>
In short, this process takes the values of our original raster and recalculates new values for a target raster with custom resolution and origin.</p>
<!--toDo: jn-->
<!-- consider if adding this new figure makes sense -->
<p>Several methods for recalculating (estimating) values for a raster with different resolutions/origins exist (Figure <a href="geometric-operations.html#fig:resampl">5.17</a>).
It includes:</p>
<p>There are several methods for estimating values for a raster with different resolutions/origins, as shown in Figure <a href="geometric-operations.html#fig:resampl">5.17</a>.
These resampling methods include:</p>
<ul>
<li>Nearest neighbor - assigns the value of the nearest cell of the original raster to the cell of the target one.
It is fast and usually suitable for categorical rasters</li>
<li>Bilinear interpolation - assigns a weighted average of the four nearest cells from the original raster to the cell of the target one (Figure <a href="geometric-operations.html#fig:bilinear">5.16</a>). The fastest method for continuous rasters</li>
<li>Cubic interpolation - uses values of 16 nearest cells of the original raster to determine the output cell value, applying third-order polynomial functions. Used for continuous rasters. It results in a more smoothed surface than the bilinear interpolation, but is also more computationally demanding</li>
<li>Cubic spline interpolation - also uses values of 16 nearest cells of the original raster to determine the output cell value, but applies cubic splines (piecewise third-order polynomial functions) to derive the results. Used for continuous rasters</li>
<li>Lanczos windowed sinc resampling - uses values of 36 nearest cells of the original raster to determine the output cell value. Used for continuous rasters<a class="footnote-ref" tabindex="0" data-toggle="popover" data-content='&lt;p&gt;More detailed explanation of this method can be found at &lt;a href="https://gis.stackexchange.com/a/14361/20955" class="uri"&gt;https://gis.stackexchange.com/a/14361/20955&lt;/a&gt;.&lt;/p&gt;'><sup>24</sup></a>
<li>Nearest neighbor: assigns the value of the nearest cell of the original raster to the cell of the target one. This is a fast simple technique that is usually suitable for resampling categorical rasters.</li>
<li>Bilinear interpolation: assigns a weighted average of the four nearest cells from the original raster to the cell of the target one (Figure <a href="geometric-operations.html#fig:bilinear">5.16</a>). This is the fastest method that is appropriate for continuous rasters.</li>
<li>Cubic interpolation: uses values of 16 nearest cells of the original raster to determine the output cell value, applying third-order polynomial functions. Used for continuous rasters and results in a smoother surface that results bilinear interpolation, but is more computationally intensive.</li>
<li>Cubic spline interpolation: also uses values of 16 nearest cells of the original raster to determine output cell, but applies cubic splines (piecewise third-order polynomial functions) to derive the results. Used for continuous rasters.</li>
<li>Lanczos windowed sinc resampling: uses values of 36 nearest cells of the original raster to determine the output cell value. Used for continuous rasters.<a class="footnote-ref" tabindex="0" data-toggle="popover" data-content='&lt;p&gt;
More detailed explanation of this method can be found at &lt;a href="https://gis.stackexchange.com/a/14361/20955" class="uri"&gt;https://gis.stackexchange.com/a/14361/20955&lt;/a&gt;.&lt;/p&gt;'><sup>24</sup></a>
</li>
</ul>
<p>As you can find in the above explanation, only <em>nearest neighbor</em> is suitable for categorical rasters, while all the methods can be used (with different outcomes) for the continuous rasters.
<p>The above explanation highlights that only <em>nearest neighbor</em> resampling is suitable for categorical rasters, while all the methods can be used (with different outcomes) for continuous rasters.
Additionally, each successive method requires more processing time.</p>
<p>To apply resampling, the <strong>terra</strong> package provides a <code><a href="https://rdrr.io/pkg/terra/man/resample.html">resample()</a></code> function.
It accepts an input raster (<code>x</code>), a raster with target spatial properties (<code>y</code>), and a resampling method (<code>method</code>).</p>
Expand Down Expand Up @@ -1040,7 +1040,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion gis.html
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h1>Welcome<a class="anchor" aria-label="anchor" href="#welcome"><i class="fas f
<p>The online version of the book is hosted at <a href="https://geocompr.robinlovelace.net">geocompr.robinlovelace.net</a> and kept up-to-date by <a href="https://github.com/Robinlovelace/geocompr/actions">GitHub Actions</a>.
Its current ‘build status’ as follows:</p>
<p><a href="https://github.com/Robinlovelace/geocompr/actions"><img src="https://github.com/Robinlovelace/geocompr/workflows/Render/badge.svg" alt="Actions"></a></p>
<p>This version of the book was built on GH Actions on 2022-04-24.</p>
<p>This version of the book was built on GH Actions on 2022-04-25.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png"></a><br>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.</p>
<div id="how-to-contribute" class="section level2 unnumbered">
<h2>How to contribute?<a class="anchor" aria-label="anchor" href="#how-to-contribute"><i class="fas fa-link"></i></a>
Expand Down Expand Up @@ -202,7 +202,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
4 changes: 2 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Geocomputation with R'
author: 'Robin Lovelace, Jakub Nowosad, Jannes Muenchow'
date: '2022-04-24'
date: '2022-04-25'
site: bookdown::bookdown_site
output: bookdown::bs4_book
documentclass: krantz
Expand Down Expand Up @@ -42,7 +42,7 @@ Its current 'build status' as follows:

[![Actions](https://github.com/Robinlovelace/geocompr/workflows/Render/badge.svg)](https://github.com/Robinlovelace/geocompr/actions)

This version of the book was built on GH Actions on 2022-04-24.
This version of the book was built on GH Actions on 2022-04-25.

<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.

Expand Down
2 changes: 1 addition & 1 deletion intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion location.html
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion preface.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion raster-vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
2 changes: 1 addition & 1 deletion read-write.html
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ <h2>Note: Second Edition is under construction 🏗</h2>
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-24.</p>
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2022-04-25.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down

0 comments on commit bee2e47

Please sign in to comment.