4 Running LT-GEE

LT-GEE is run using the function: ee.Algorithms.TemporalSegmentation.LandTrendr which takes a dictionary of parameter arguments as input.

In its most most basic form, running LandTrendr in Google Earth Engine requires 6 steps. The following code snippets help illustrate the steps.

The following snippets are only a demonstration aid. In application, use the provided code examples to learn and build from, and take advantage of the API functions we’ve put together to build collections and run LandTrendr

  1. Define starting and ending years of the times series
  1. Define an area to run LandTrendr on as an ee.Geometry
  1. Define the LandTrendr run parameters as a dictionary. See the parameters section for definitions. Note that the image collection will be appended to this dictionary in a later step.
  1. Build an image collection that includes only one image per year, subset to a single band or index (you can include other bands - the first will be segmented, the others will be fit to the vertices). Note that we are using a mock function to reduce annual image collections to a single image - this can be accomplished many ways using various best-pixel-compositing methods.
  1. Append the image collection to the LandTrendr run parameter dictionary
  1. Run the LandTrendr algorithm

Please note that for the sake of a basic example LT-GEE run, we are not addressing the two really important steps in collection building: 1) to mask cloud and cloud shadow pixels during annual image compositing (step 4) and 2) to ensure that the spectral band or index that is to be segmented is oriented so that vegetation loss is represented by a positive delta (we used a SWIR band, which is the correct orientation for use in LT-GEE).