terra
For this chapter, you will need the following R Packages:
library(terra) library(arc2r)
With the terra
package, data is imported using the function rast
.
library(terra) swissalti3d <- terra::rast("sample_data/SWISSALTI3D_10_TIFF_CHLV95_LN02_2600_1196.tif")
Just like before, calling the object in our console will give us the class name and some meta information on the dataset.
swissalti3d
And calling plot
on our object visualizes it spatially.
plot(swissalti3d)
//todo add method for rasters with multiple layers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.