Looking Back Most people using GIS or remote sensing data came across the data obtained by the landsat satellite family. It all started with the Landsat 1 mission on July 23, 1972. The Landsat missions aquired millions of pictures which made available to public usage in 1992. Sensors developed and provided more and more details in terms of spectral and ground resolution.
The main question when using remote sensed raster data, as we do, is the question of NaN-treatment. Many R functions are able to use an option like rm.NaN=TRUE to treat these missing values. In our case the kmeans function in R is not capable to use such a parameter. After reading the tif-files and creating of a layer stack we will go on with a work-around to solve the missing values problem of the non-covered areas of a Landsat picture.
In my last post I was explaining the usage of QGis to do a layerstack of a Landsat-scene. Due to the fact that further research and trying out resulted in frustration I decided to stick with a software I know well: R. So download the needed layers here and open up your flavoured version of R (in my case RStudio).