@@ -81,7 +81,7 @@ page](https://datacarpentry.org/geospatial-workshop/data/).
81
81
82
82
We will be working with a series of GeoTIFF files in this lesson. The
83
83
GeoTIFF format contains a set of embedded tags with metadata about the raster
84
- data. We can use the function ` GDALinfo ()` to get information about our raster
84
+ data. We can use the function ` describe ()` to get information about our raster
85
85
data before we read that data into R. It is ideal to do this before importing
86
86
your data.
87
87
@@ -148,7 +148,7 @@ summary(values(DSM_HARV))
148
148
To visualise this data in R using ` ggplot2 ` , we need to convert it to a
149
149
dataframe. We learned about dataframes in [ an earlier
150
150
lesson] ( https://datacarpentry.org/r-intro-geospatial/04-data-structures-part2/index.html ) .
151
- The ` raster ` package has an built-in function for conversion to a plotable dataframe.
151
+ The ` terra ` package has an built-in function for conversion to a plotable dataframe.
152
152
153
153
``` {r}
154
154
DSM_HARV_df <- as.data.frame(DSM_HARV, xy = TRUE)
@@ -316,9 +316,9 @@ raster: surface elevation in meters for one time period.
316
316
317
317
![ ] ( fig/dc-spatial-raster/single_multi_raster.png ) {alt='Multi-band raster image'}
318
318
319
- A raster dataset can contain one or more bands. We can use the ` raster ()`
319
+ A raster dataset can contain one or more bands. We can use the ` rast ()`
320
320
function to import one single band from a single or multi-band raster. We can
321
- view the number of bands in a raster using the ` nlayers ()` function.
321
+ view the number of bands in a raster using the ` nly ()` function.
322
322
323
323
``` {r view-raster-bands}
324
324
nlyr(DSM_HARV)
@@ -586,7 +586,7 @@ describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV\_DSMhill.tif")
586
586
587
587
## More Resources
588
588
589
- - [Read more about the `raster ` package in R.](https://cran.r-project.org/package=raster )
589
+ - [Read more about the `terra ` package in R.](https://cran.r-project.org/package=terra )
590
590
591
591
592
592
::::::::::::::::::::::::::::::::::::::::::::::::::
0 commit comments