User Tools

Site Tools


en:courses:training:element-01:worksheets:lc-ws-04-2

W04-2: Land cover classification

Once training sites are available, we can start with classifying the Landsat scene. In this worksheet, we will use Random Forest as a classifier.

Things you need for this worksheet

  • R — the interpreter can be installed on any operation system. For Linux, you should use the r-cran packages supplied for your Linux distribution. If you use Ubuntu, this is one of many starting points. If you use Windows, you could install R from the official CRAN web page.

  • R Studio — we recommend to use R Studio for (interactive) programming with R. You can download R Studio from the official web page.

Learning log assignments

:-\ Load the cropped Landsat bands 1-7 and the training site shapefile into R. Make sure that both datasets are in the same projection.

:-\ Extract the information of the landsat bands for the location of the training sites. Return the results as a data.frame

:-\ Add a new column to the data.frame which contains the land cover information from the training site shapefile

:-\ Split your dataset into training and testing data (e.g. 30% Testing, 70% Training).

:-\ Use the training dataset to train a random forest model that is able to predict the land cover class from the spectral Landsat bands.

:-\ Explore which bands were important in the model

:-\ Use the model to predict on the entire Landsat scene. Plot your results with spplot.

en/courses/training/element-01/worksheets/lc-ws-04-2.txt · Last modified: 2022/03/13 19:16 by 127.0.0.1