Skip to content

Commit 2dbaac5

Browse files
committed
Deploy commit: Update routing profile, close #1147 b848389
1 parent 0b99176 commit 2dbaac5

33 files changed

+41
-41
lines changed

01-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This may sound simple and easy to achieve (which it is if you carefully maintain
4949

5050
We define geocomputation as
5151

52-
> A field of research, software development and practical application that uses geographic data to solve problems, with a focus on reproducibility, flexibility and tool development.
52+
> Academic research, software development and practical applications that use geographic data to solve problems, with a focus on reproducibility, flexibility and tool development.
5353
5454
Geocomputation\index{geocomputation!definition} is a young term, dating back to the first conference on the subject in 1996.^[
5555
The first 'GeoComputation' conference took place at the University of Leeds, where one of the authors (Robin) is currently based.

13-transport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ This is done using the publicly available OSRM service with the **stplanr** func
511511

512512
``` r
513513
routes_short = route(l = desire_lines_short, route_fun = route_osrm,
514-
osrm.profile = "bike")
514+
osrm.profile = "car")
515515
```
516516

517517
The output is `routes_short`, an `sf` object representing routes on the transport network\index{network} that are suitable for cycling (according to the OSRM routing engine at least), one for each desire line.
@@ -570,7 +570,7 @@ routes_short_scenario = routes_short |>
570570
mutate(bicycle = bicycle + car_driver * uptake,
571571
car_driver = car_driver * (1 - uptake))
572572
sum(routes_short_scenario$bicycle) - sum(routes_short$bicycle)
573-
#> [1] 3862
573+
#> [1] 3264
574574
```
575575

576576
Having created a scenario in which approximately 4000 trips have switched from driving to cycling, we can now model where this updated modeled cycling activity will take place.

404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ <h2>Second Edition</h2>
129129
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
130130

131131
<div class="col-12 col-md-6 mt-3">
132-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
132+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
133133
</div>
134134

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

adv-map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ <h2>Second Edition</h2>
13421342
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
13431343

13441344
<div class="col-12 col-md-6 mt-3">
1345-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
1345+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
13461346
</div>
13471347

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

algorithms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ <h2>Second Edition</h2>
529529
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
530530

531531
<div class="col-12 col-md-6 mt-3">
532-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
532+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
533533
</div>
534534

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

attr.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ <h2>Second Edition</h2>
861861
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
862862

863863
<div class="col-12 col-md-6 mt-3">
864-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
864+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
865865
</div>
866866

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

conclusion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ <h2>Second Edition</h2>
444444
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
445445

446446
<div class="col-12 col-md-6 mt-3">
447-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
447+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
448448
</div>
449449

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

eco.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ <h2>Second Edition</h2>
628628
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
629629

630630
<div class="col-12 col-md-6 mt-3">
631-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
631+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
632632
</div>
633633

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

figures/circle-intersection-1.png

0 Bytes
Loading

figures/cycleways-1.png

-2.3 KB
Loading

figures/points-1.png

0 Bytes
Loading

figures/rnetvis-1.png

-2.5 KB
Loading

figures/rnetvis-2.png

-694 Bytes
Loading

figures/routes-1.png

5.44 KB
Loading

figures/wayssln-1.png

-2.93 KB
Loading

foreword-1st-edition.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h2>Second Edition</h2>
157157
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
158158

159159
<div class="col-12 col-md-6 mt-3">
160-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
160+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
161161
</div>
162162

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

foreword-2nd-edition.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h2>Second Edition</h2>
148148
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
149149

150150
<div class="col-12 col-md-6 mt-3">
151-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
151+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
152152
</div>
153153

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

geometry-operations.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ <h2>Second Edition</h2>
10161016
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
10171017

10181018
<div class="col-12 col-md-6 mt-3">
1019-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
1019+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
10201020
</div>
10211021

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

gis.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -618,21 +618,21 @@ <h2>
618618
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://rsbivand.github.io/rgrass/">rgrass</a></span><span class="op">)</span></span>
619619
<span><span class="fu">link2GI</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/link2GI/reference/linkGRASS.html">linkGRASS</a></span><span class="op">(</span><span class="va">london_streets</span>, ver_select <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
620620
<p>Before we can use GRASS GIS geoalgorithms, we also need to add data to GRASS GIS’s spatial database.
621-
Luckily, the convenience function <code><a href="https://rsbivand.github.io/rgrass/reference/readVECT.html">write_VECT()</a></code> does this for us.
622-
(Use <code><a href="https://rsbivand.github.io/rgrass/reference/readRAST.html">write_RAST()</a></code> for raster data.)
621+
Luckily, the convenience function <code><a href="https://rdrr.io/pkg/rgrass/man/readVECT.html">write_VECT()</a></code> does this for us.
622+
(Use <code><a href="https://rdrr.io/pkg/rgrass/man/readRAST.html">write_RAST()</a></code> for raster data.)
623623
In our case, we add the street and cycle hire point data while using only the first attribute column, and name them as <code>london_streets</code> and <code>points</code> in GRASS GIS.</p>
624624
<div class="sourceCode" id="cb378"><pre class="downlit sourceCode r">
625-
<code class="sourceCode R"><span><span class="fu"><a href="https://rsbivand.github.io/rgrass/reference/readVECT.html">write_VECT</a></span><span class="op">(</span><span class="fu">terra</span><span class="fu">::</span><span class="fu"><a href="https://rspatial.github.io/terra/reference/vect.html">vect</a></span><span class="op">(</span><span class="va">london_streets</span><span class="op">)</span>, vname <span class="op">=</span> <span class="st">"london_streets"</span><span class="op">)</span></span>
626-
<span><span class="fu"><a href="https://rsbivand.github.io/rgrass/reference/readVECT.html">write_VECT</a></span><span class="op">(</span><span class="fu">terra</span><span class="fu">::</span><span class="fu"><a href="https://rspatial.github.io/terra/reference/vect.html">vect</a></span><span class="op">(</span><span class="va">points</span><span class="op">[</span>, <span class="fl">1</span><span class="op">]</span><span class="op">)</span>, vname <span class="op">=</span> <span class="st">"points"</span><span class="op">)</span></span></code></pre></div>
625+
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/rgrass/man/readVECT.html">write_VECT</a></span><span class="op">(</span><span class="fu">terra</span><span class="fu">::</span><span class="fu"><a href="https://rspatial.github.io/terra/reference/vect.html">vect</a></span><span class="op">(</span><span class="va">london_streets</span><span class="op">)</span>, vname <span class="op">=</span> <span class="st">"london_streets"</span><span class="op">)</span></span>
626+
<span><span class="fu"><a href="https://rdrr.io/pkg/rgrass/man/readVECT.html">write_VECT</a></span><span class="op">(</span><span class="fu">terra</span><span class="fu">::</span><span class="fu"><a href="https://rspatial.github.io/terra/reference/vect.html">vect</a></span><span class="op">(</span><span class="va">points</span><span class="op">[</span>, <span class="fl">1</span><span class="op">]</span><span class="op">)</span>, vname <span class="op">=</span> <span class="st">"points"</span><span class="op">)</span></span></code></pre></div>
627627
<p>The <strong>rgrass</strong> package expects its inputs and gives its outputs as <strong>terra</strong> objects.
628-
Therefore, we need to convert our <code>sf</code> spatial vectors to <strong>terra</strong>’s <code>SpatVector</code>s using the <code><a href="https://rspatial.github.io/terra/reference/vect.html">vect()</a></code> function to be able to use <code><a href="https://rsbivand.github.io/rgrass/reference/readVECT.html">write_VECT()</a></code>.<a class="footnote-ref" tabindex="0" data-toggle="popover" data-content='&lt;p&gt;You can learn more how to convert between spatial classes in R by reading the (Conversions between different spatial classes in R)[&lt;a href="https://geocompx.org/post/2021/spatial-classes-conversion/" class="uri"&gt;https://geocompx.org/post/2021/spatial-classes-conversion/&lt;/a&gt;] blog post and the
628+
Therefore, we need to convert our <code>sf</code> spatial vectors to <strong>terra</strong>’s <code>SpatVector</code>s using the <code><a href="https://rspatial.github.io/terra/reference/vect.html">vect()</a></code> function to be able to use <code><a href="https://rdrr.io/pkg/rgrass/man/readVECT.html">write_VECT()</a></code>.<a class="footnote-ref" tabindex="0" data-toggle="popover" data-content='&lt;p&gt;You can learn more how to convert between spatial classes in R by reading the (Conversions between different spatial classes in R)[&lt;a href="https://geocompx.org/post/2021/spatial-classes-conversion/" class="uri"&gt;https://geocompx.org/post/2021/spatial-classes-conversion/&lt;/a&gt;] blog post and the
629629
(Coercion between object formats)[&lt;a href="https://CRAN.R-project.org/package=rgrass/vignettes/coerce.html" class="uri"&gt;https://CRAN.R-project.org/package=rgrass/vignettes/coerce.html&lt;/a&gt;] vignette.&lt;/p&gt;'><sup>70</sup></a></p>
630630
<p>Now, both datasets exist in the GRASS GIS database.
631631
To perform our network analysis, we need a topologically clean street network.
632632
GRASS GIS’s <code>"v.clean"</code> takes care of the removal of duplicates, small angles and dangles, among others.
633633
Here, we break lines at each intersection to ensure that the subsequent routing algorithm can actually turn right or left at an intersection, and save the output in a GRASS GIS object named <code>streets_clean</code>.</p>
634634
<div class="sourceCode" id="cb379"><pre class="downlit sourceCode r">
635-
<code class="sourceCode R"><span><span class="fu"><a href="https://rsbivand.github.io/rgrass/reference/execGRASS.html">execGRASS</a></span><span class="op">(</span></span>
635+
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/rgrass/man/execGRASS.html">execGRASS</a></span><span class="op">(</span></span>
636636
<span> cmd <span class="op">=</span> <span class="st">"v.clean"</span>, input <span class="op">=</span> <span class="st">"london_streets"</span>, output <span class="op">=</span> <span class="st">"streets_clean"</span>,</span>
637637
<span> tool <span class="op">=</span> <span class="st">"break"</span>, flags <span class="op">=</span> <span class="st">"overwrite"</span></span>
638638
<span><span class="op">)</span></span></code></pre></div>
@@ -646,7 +646,7 @@ <h2>
646646
<code>"v.net"</code>’s connect-operator does exactly this.
647647
We save its output in <code>streets_points_con</code>.</p>
648648
<div class="sourceCode" id="cb380"><pre class="downlit sourceCode r">
649-
<code class="sourceCode R"><span><span class="fu"><a href="https://rsbivand.github.io/rgrass/reference/execGRASS.html">execGRASS</a></span><span class="op">(</span></span>
649+
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/rgrass/man/execGRASS.html">execGRASS</a></span><span class="op">(</span></span>
650650
<span> cmd <span class="op">=</span> <span class="st">"v.net"</span>, input <span class="op">=</span> <span class="st">"streets_clean"</span>, output <span class="op">=</span> <span class="st">"streets_points_con"</span>,</span>
651651
<span> points <span class="op">=</span> <span class="st">"points"</span>, operation <span class="op">=</span> <span class="st">"connect"</span>, threshold <span class="op">=</span> <span class="fl">0.001</span>,</span>
652652
<span> flags <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="st">"overwrite"</span>, <span class="st">"c"</span><span class="op">)</span></span>
@@ -657,14 +657,14 @@ <h2>
657657
Since we would like to calculate the route for all cycle stations, we set it to <code>1-25</code>.
658658
To access the GRASS GIS help page of the traveling salesman algorithm, run <code>execGRASS("g.manual", entry = "v.net.salesman")</code>.</p>
659659
<div class="sourceCode" id="cb381"><pre class="downlit sourceCode r">
660-
<code class="sourceCode R"><span><span class="fu"><a href="https://rsbivand.github.io/rgrass/reference/execGRASS.html">execGRASS</a></span><span class="op">(</span></span>
660+
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/rgrass/man/execGRASS.html">execGRASS</a></span><span class="op">(</span></span>
661661
<span> cmd <span class="op">=</span> <span class="st">"v.net.salesman"</span>, input <span class="op">=</span> <span class="st">"streets_points_con"</span>,</span>
662662
<span> output <span class="op">=</span> <span class="st">"shortest_route"</span>, center_cats <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op">(</span><span class="st">"1-"</span>, <span class="fu"><a href="https://rspatial.github.io/terra/reference/dimensions.html">nrow</a></span><span class="op">(</span><span class="va">points</span><span class="op">)</span><span class="op">)</span>,</span>
663663
<span> flags <span class="op">=</span> <span class="st">"overwrite"</span></span>
664664
<span><span class="op">)</span></span></code></pre></div>
665665
<p>To see our result, we read the result into R, convert it into an <code>sf</code>-object keeping only the geometry, and visualize it with the help of the <strong>mapview</strong> package (Figure <a href="gis.html#fig:grass-mapview">10.5</a> and Section <a href="adv-map.html#interactive-maps">9.4</a>).</p>
666666
<div class="sourceCode" id="cb382"><pre class="downlit sourceCode r">
667-
<code class="sourceCode R"><span><span class="va">route</span> <span class="op">=</span> <span class="fu"><a href="https://rsbivand.github.io/rgrass/reference/readVECT.html">read_VECT</a></span><span class="op">(</span><span class="st">"shortest_route"</span><span class="op">)</span> <span class="op">|&gt;</span></span>
667+
<code class="sourceCode R"><span><span class="va">route</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/pkg/rgrass/man/readVECT.html">read_VECT</a></span><span class="op">(</span><span class="st">"shortest_route"</span><span class="op">)</span> <span class="op">|&gt;</span></span>
668668
<span> <span class="fu"><a href="https://r-spatial.github.io/sf/reference/st_as_sf.html">st_as_sf</a></span><span class="op">(</span><span class="op">)</span> <span class="op">|&gt;</span></span>
669669
<span> <span class="fu"><a href="https://r-spatial.github.io/sf/reference/st_geometry.html">st_geometry</a></span><span class="op">(</span><span class="op">)</span></span>
670670
<span><span class="fu">mapview</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/mapview/man/mapView.html">mapview</a></span><span class="op">(</span><span class="va">route</span><span class="op">)</span> <span class="op">+</span> <span class="va">points</span></span></code></pre></div>
@@ -1064,7 +1064,7 @@ <h2>Second Edition</h2>
10641064
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
10651065

10661066
<div class="col-12 col-md-6 mt-3">
1067-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
1067+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
10681068
</div>
10691069

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

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ <h1>Welcome<a class="anchor" aria-label="anchor" href="#welcome"><i class="fas f
121121
<p>The online version of the book is hosted at <a href="https://r.geocompx.org">r.geocompx.org</a> and kept up-to-date by <a href="https://github.com/geocompx/geocompr/actions">GitHub Actions</a>.
122122
Its current ‘build status’ as follows:</p>
123123
<p><a href="https://github.com/geocompx/geocompr/actions"><img src="https://github.com/geocompx/geocompr/workflows/Render/badge.svg" alt="Actions"></a></p>
124-
<p>This version of the book was built on GH Actions on 2024-12-26.</p>
124+
<p>This version of the book was built on GH Actions on 2025-01-01.</p>
125125
<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 book is licensed to you 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>
126126
<p><a rel="license" href="https://creativecommons.org/publicdomain/zero/1.0/"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/zero/1.0/88x31.png"></a><br>The code samples in this book are licensed under <a rel="license" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 1.0 Universal (CC0 1.0)</a>.</p>
127127
<div id="how-to-contribute" class="section level2 unnumbered">
@@ -237,7 +237,7 @@ <h2>Second Edition</h2>
237237
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">
238238

239239
<div class="col-12 col-md-6 mt-3">
240-
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2024-12-26.</p>
240+
<p>"<strong>Geocomputation with R</strong>" was written by Robin Lovelace, Jakub Nowosad, Jannes Muenchow. It was last built on 2025-01-01.</p>
241241
</div>
242242

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

0 commit comments

Comments
 (0)