From 091ef4ab4740df4193e5d3a8f8a8e8597bfcf158 Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Wed, 15 May 2024 18:09:33 +0100 Subject: [PATCH] Update wording about problematic hyperlinks, close #1097 --- 07-reproj.Rmd | 2 +- 08-read-write-plot.Rmd | 7 +++---- 11-algorithms.Rmd | 2 +- _04-ex.Rmd | 2 +- index.Rmd | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/07-reproj.Rmd b/07-reproj.Rmd index 29e4c83d9..2970dd4d3 100644 --- a/07-reproj.Rmd +++ b/07-reproj.Rmd @@ -100,7 +100,7 @@ These string representations, built on a key=value form (e.g, `+proj=longlat +da \index{CRS!proj-string} Recent PROJ versions (6+) still allow use of proj-strings to define coordinate operations, but some proj-string keys (`+nadgrids`, `+towgs84`, `+k`, `+init=epsg:`) are either no longer supported or are discouraged. Additionally, only three datums (i.e., WGS84, NAD83, and NAD27) can be directly set in proj-string. -Longer explanations of the evolution of CRS definitions and the PROJ library can be found in @bivand_progress_2021, Chapter 2 of @pebesma_spatial_2022, and a [blog post by Floris Vanderhaeghe](https://inbo.github.io/tutorials/tutorials/spatial_crs_coding/). +Longer explanations of the evolution of CRS definitions and the PROJ library can be found in @bivand_progress_2021, Chapter 2 of @pebesma_spatial_2022, and a [blog post by Floris Vanderhaeghe, available at inbo.github.io/tutorials/tutorials/spatial_crs_coding/](https://inbo.github.io/tutorials/tutorials/spatial_crs_coding/). Also, as outlined in the [PROJ documentation](https://proj.org/development/reference/cpp/cpp_general.html) there are different versions of the WKT CRS format including WKT1 and two variants of WKT2, the latter of which (WKT2, 2018 specification) corresponds to the ISO 19111:2019 [@opengeospatialconsortium_wellknown_2019]. ## Querying and setting coordinate systems {#crs-setting} diff --git a/08-read-write-plot.Rmd b/08-read-write-plot.Rmd index 3962379b1..f3ea0866b 100644 --- a/08-read-write-plot.Rmd +++ b/08-read-write-plot.Rmd @@ -437,12 +437,12 @@ writeRaster(x = single_layer, filename = "my_raster.tif", filetype = "COG", overwrite = TRUE) ``` -To learn more about the compression of GeoTIFF files, read Paul Ramsey's [comprehensive blog post on this topic](https://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html). +To learn more about the compression of GeoTIFF files, we recommend Paul Ramsey's [comprehensive blog post, GeoTiff Compression for Dummies](https://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html) which can be found online. ## Geoportals {#retrieving-data} \index{open data} -A vast and ever-increasing amount of geographic data is available on the internet, much of which is free to access and use (with appropriate credit given to its providers).^[For example, visit https://freegisdata.rtwilson.com/ for a long list of websites with freely available geographic datasets.] +A vast and ever-increasing amount of geographic data is available on the internet, much of which is free to access and use (with appropriate credit given to its providers).^[For example, visit [freegisdata.rtwilson.com](https://freegisdata.rtwilson.com/) for a long list of websites with freely available geographic datasets.] In some ways there is now *too much* data, in the sense that there are often multiple places to access the same dataset. Some datasets are of poor quality. In this context, it is vital to know where to look, so the first section covers some of the most important sources. @@ -699,10 +699,9 @@ Also note the use of `write_disk()` to ensure that the results are written to di For many everyday tasks, however, a higher-level interface may be more appropriate, and a number of R packages, and tutorials, have been developed precisely for this purpose. The package **ows4R** has been developed for working with OWS services. It provides a stable interface to common access services, such as the WFS, WCS for data, CSW for metadata, and WPS for processing. -The OGC services coverage is described [here](https://github.com/eblondel/ows4R?tab=readme-ov-file#ogc-standards-coverage-status), with new standard protocols under investigation/development. +The OGC services coverage is described in the README of the `ows4R` package, hosted at [github.com/eblondel/ows4R](https://github.com/eblondel/ows4R?tab=readme-ov-file#ogc-standards-coverage-status), with new standard protocols under investigation/development. Based on the above example, the code below show how to perform `getCapabilities` and `getFeatures` operations with this package. - The **ows4R** package relies on the principle of clients. To interact with an OWS service (such as WFS), a client is created as follows: diff --git a/11-algorithms.Rmd b/11-algorithms.Rmd index 5b82a8f9c..76d64c90b 100644 --- a/11-algorithms.Rmd +++ b/11-algorithms.Rmd @@ -422,7 +422,7 @@ Programming takes many hours of dedicated study and practice before you become p The challenge facing developers aiming to implement new algorithms\index{algorithm} in an efficient way is put in perspective by considering the amount work that has gone into creating a simple function that is not intended for use in production: in its current state, `poly_centroid()` fails on most (non-convex) polygons! This raises the question: how to generalize the function? -Two options are (1) to find ways to triangulate non-convex polygons (a topic covered in the online [algorithm](https://geocompx.github.io/geocompkg/articles/algorithm.html) article that supports this chapter) and (2) to explore other centroid algorithms that do not rely on triangular meshes. +Two options are (1) to find ways to triangulate non-convex polygons (a topic covered in the online [Algorithms Extended](https://geocompx.github.io/geocompkg/articles/algorithm.html) article hosted at geocompx.github.io/geocompkg/articles/) and (2) to explore other centroid algorithms that do not rely on triangular meshes. A wider question is: is it worth programming a solution at all when high performance algorithms have already been implemented and packaged in functions such as `st_centroid()`? The reductionist answer in this specific case is 'no'. diff --git a/_04-ex.Rmd b/_04-ex.Rmd index 229f52288..2fc20bdcb 100644 --- a/_04-ex.Rmd +++ b/_04-ex.Rmd @@ -194,7 +194,7 @@ two_rasts_df = as.data.frame(two_rasts) cor(two_rasts_df$ndvi, two_rasts_df$ndwi) ``` -E8. A StackOverflow [post](https://stackoverflow.com/questions/35555709/global-raster-of-geographic-distances) shows how to compute distances to the nearest coastline using `raster::distance()`. +E8. A StackOverflow [post (stackoverflow.com/questions/35555709)](https://stackoverflow.com/questions/35555709/global-raster-of-geographic-distances) shows how to compute distances to the nearest coastline using `raster::distance()`. Try to do something similar but with `terra::distance()`: retrieve a digital elevation model of Spain, and compute a raster which represents distances to the coast across the country (hint: use `geodata::elevation_30s()`). Convert the resulting distances from meters to kilometers. Note: it may be wise to increase the cell size of the input raster to reduce compute time during this operation (`aggregate()`). diff --git a/index.Rmd b/index.Rmd index 312dc07d0..368dc4e10 100644 --- a/index.Rmd +++ b/index.Rmd @@ -253,8 +253,8 @@ The chapters in Part I aim to address this by providing reproducible code on sim An important aspect of the book from a teaching/learning perspective is the **exercises** at the end of each chapter. Completing these will develop your skills and equip you with the confidence needed to tackle a range of geospatial problems. Solutions to the exercises can be found in an online booklet that accompanies Geocomputation with R, hosted at [r.geocompx.org/solutions](https://r.geocompx.org/solutions). -To learn how this booklet was created, and how to update solutions in files such as [_01-ex.Rmd](https://github.com/geocompx/geocompr/blob/main/_01-ex.Rmd), see this [blog post](https://geocompx.org/post/2022/geocompr-solutions/). -For more blog posts and extended examples, see the book's supporting website at [geocompx.org](https://geocompx.org). +To learn how this booklet was created, and how to update solutions in files such as [_01-ex.Rmd](https://github.com/geocompx/geocompr/blob/main/_01-ex.Rmd), see our blog post on [Geocomputation with R solutions](https://geocompx.org/post/2022/geocompr-solutions/). +More blog posts and examples can be found at [geocompx.org](https://geocompx.org). Impatient readers are welcome to dive straight into the practical examples, starting in Chapter \@ref(spatial-class). However, we recommend reading about the wider context of *Geocomputation with R* in Chapter \@ref(intro) first.