Skip to content

Commit 6ab8b23

Browse files
fix: restore geocompr CI rendering
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a667dd8 commit 6ab8b23

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/dev-sf.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515

1616
steps:
1717
- name: Checkout Project
18-
uses: actions/checkout@v1
18+
uses: actions/checkout@v4
1919

2020
- name: Build book
2121
run: |
2222
Rscript -e 'install.packages("geocompkg", repos = c("https://geocompr.r-universe.dev", "https://cloud.r-project.org"), dependencies = TRUE, force = TRUE)'
23-
Rscript -e 'remotes::install_github("r-spatial/sf")'
24-
Rscript -e 'remotes::install_github("r-spatial/stars")'
25-
Rscript -e 'remotes::install_github("rspatial/terra")'
23+
Rscript -e 'if (!requireNamespace("pak", quietly = TRUE)) install.packages("pak", repos = "https://cloud.r-project.org"); pak::pak("r-spatial/sf")'
24+
Rscript -e 'if (!requireNamespace("pak", quietly = TRUE)) install.packages("pak", repos = "https://cloud.r-project.org"); pak::pak("r-spatial/stars")'
25+
Rscript -e 'if (!requireNamespace("pak", quietly = TRUE)) install.packages("pak", repos = "https://cloud.r-project.org"); pak::pak("rspatial/terra")'
2626
#Rscript -e 'remotes::install_github("geocompx/geocompkg", dependencies = TRUE, force = TRUE)'
2727
Rscript -e 'bookdown::render_book("index.Rmd")'

08-read-write-plot.Rmd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,12 @@ multilayer_rast = rast(multilayer_filepath)
292292
All of the previous examples read spatial information from files stored on your hard drive.
293293
However, GDAL also allows reading data directly from online resources, such as HTTP/HTTPS/FTP web resources.
294294
The only thing we need to do is to add a `/vsicurl/` prefix before the path to the file.
295-
Let's try it by connecting to the global monthly snow probability at 500-m resolution for the period 2000-2012.
296-
Snow probability for December is stored as a Cloud Optimized GeoTIFF (COG) file (see Section \@ref(file-formats)) at [zenodo.org](https://zenodo.org/record/5774954/files/clm_snow.prob_esacci.dec_p.90_500m_s0..0cm_2000..2012_v2.0.tif).
295+
Let's try it by connecting to a remote GeoTIFF hosted by [OSGeo](https://download.osgeo.org/geotiff/samples/usgs/o41078a5.tif).
296+
This sample file is available online as a GeoTIFF (see Section \@ref(file-formats)).
297297
To read an online file, we just need to provide its URL together with the `/vsicurl/` prefix.
298298

299299
```{r, linewidth=80}
300-
myurl = paste0("/vsicurl/https://zenodo.org/record/5774954/files/",
301-
"clm_snow.prob_esacci.dec_p.90_500m_s0..0cm_2000..2012_v2.0.tif")
300+
myurl = "/vsicurl/https://download.osgeo.org/geotiff/samples/usgs/o41078a5.tif"
302301
snow = rast(myurl)
303302
snow
304303
```

code/chapters/08-read-write-plot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ multilayer_rast = rast(multilayer_filepath)
248248

249249

250250
## ---------------------------------------------------------------------------------------------------
251-
myurl = "/vsicurl/https://zenodo.org/record/5774954/files/clm_snow.prob_esacci.dec_p.90_500m_s0..0cm_2000..2012_v2.0.tif"
251+
myurl = "/vsicurl/https://download.osgeo.org/geotiff/samples/usgs/o41078a5.tif"
252252
snow = rast(myurl)
253253
snow
254254

0 commit comments

Comments
 (0)