Part 4: Land Cover Mapping

The output of part 3 was a stack of land cover classifications organized by CCDC models. Each pixel contains different model start and end times, so the land cover label for each band corresponds to different time periods for each pixel. Well that’s not very helpful, is it?

Part 4 of this tutorial demonstrates how to go from the classification “stack” to a map of land cover at a specific year, or change between years.

Mapping Requirements

  • A classified ‘stack’ of as demonstrated in Part 3 of this tutorial

To go from a classified image stack to a classification at a date is relatively straightforward. To get a land cover classification at a specific date we can use the ‘getLcAtDate’ function in our API.

var utils = require('projects/GLANCE:ccdcUtilities/api')
var classificationStack = '/PATH/TO/IMAGE/STACK'
var dateOfClassification = '2014-03-27'
var matchingDate = classUtils.getLcAtDate(classificationStack,

This can easily be extended to map change between two dates. In this example we calculate the post-deforestation land cover between 2000 and 2018

var class2000 = utils.Classification.getLcAtDate(classificationStack,

var class2018 = utils.Classification.getLcAtDate(classificationStack,

var deforestation = class2000.eq(5)

    {palette: 'red'},

var postDefClass = class2018.updateMask(deforestation)

var viz = utils.Results.viz

    'Post-Deforestation Class')

Note that the post-disturbance land cover is almost entirely from the ‘Herbaceous’ class.



In the above example, the Forest class corresponds to the number 5. This process can be repeated to map any type of land cover change for the classes in your legend. For example, the following example shows expansion of river water west of Porto Velho (Cyan are pixels that were converted from non-water to water)..

var regrowth = class2000.neq(5).and(class2000.neq(0))

        {palette: 'cyan'},
New Water

New Water