====== 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 ===== * {{section>en:resources:templates:tools#R environment&inline}} * {{section>en:resources:templates:tools#R studio&inline}} * [[en:courses:training:element-01:worksheets:lc-ws-03-1|W03-1: Read remote sensing data]] * [[en:courses:training:element-01:worksheets:lc-ws-04-1|W04-1: Training sites]] ===== 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.