I have classified the 2019 image using Google Earth Engine. How can I use the training data and code I have for 2019 and apply it from 1984 to 2018 instead of training/running a code for each image individually.

Link to my script: https://code.earthengine.google.com/15fc51687216911cfdf7d3c8c184938f


You can create your 1984-2018 images and classify each of them using the classifier you trained on the 2019 data:

var classified1984 = image1984.select(bands).classify(classifier)

If there's a lot of training data and/or there goes a lot of processing into your images, you might be better off exporting them as assets before training/classifying.

If you would be using the cart() classifier, you could store the decision tree>

var classifier = ee.Classifier.cart().train({
   features: training_subset,
   classProperty: 'landcover',
   inputProperties: bands

var treeString = classifier.explain().get('tree')

Later on, you can use the decision tree to create a classifier without training it again:

var classifier = ee.Classifier.decisionTree(treeString)

I stumbled across your question while searching for the same question. Did you ever find code to use training data from the present to classify the past? I tried messing around with the above suggestion, but it's missing too much for my beginner skills to figure out...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.