This section provides a short introduction to satellite data analysis with R. Before reading this you should first learn the basics of the terra package.

Getting satellite images for a specific project remains a challenging task. You have to find data that is suitable for your objectives, and that you can get access to. Important properties to consider while searching the remotely sensed (satellite) data include:

  1. Spatial resolution, that is the size of the grid cells

  2. Temporal resolution, that is the return time or frequency that data is collected; as well as the availability of historical images, and for a particular moment in time

  3. Spectral resolution, that is, the parts of the electromagnetic spectrum (wavelengths) for which measurements are made

  4. Radiometric resolution (sensor sensitivity; ability to measure small differences)

  5. Quality issues, such as the presence of cloud-cover or of artifacts in the data (read about problems in Landsat ETM+

There are numerous sources of remotely sensed data from satellites. Generally, the very high spatial resolution data is available as (costly) commercial products. Lower spatial resolution data is freely available from NASA, ESA, and other organizations. In this tutorial we’ll use freely available Landsat 8, Landsat 7, Landsat 5, Sentinel and MODIS data. The Landsat program started in 1972 and is is the longest running Earth-observation satellite program.

You can access public satellite data from several sources, including:







See this web site for more sources of freely available satellite remote sensing data.

It is possible to download some satellite data using R-packages. For example, you can use the luna, MODIS or MODISTools package to search, download and pre-process different MODIS products.


Most remote sensing products consist of observations of reflectance data. That is, they are measures of the intensity of the sun’s radiation that is reflected by the earth. Reflectance is normally measured for different wavelengths of the electromagnetic spectrum. For example, it can be measured in the near-infrared, red, green, and blue wavelengths. If that is the case, satellite data can be referred to as “multi-spectral” (or hyper-spectral if there are many separate wavelengths)(reading)[

The data are normally stored as raster data, and are generally referred to as “images”. Each separate image (for a place and time) is referred to as as “scene” or “tile”. As there are measurements in multiple wavelengths, a single “satellite image” has multiple observations for each pixel, that are stored in separate raster layers. In remote sensing jargon, these layers (variables) are referred to as “bands” as they typically represent reflectance values for a particular spectral bandwith, and grid cells are referred to as “pixels”.


You can download all the data required for the examples used in this book using the R code below.

dir.create("data", showWarnings = FALSE)
if (!file.exists("data/rs/samples.rds")) {
    download.file("", dest = "data/")
    unzip("data/", exdir="data")