2

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

1

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')
print(treeString)

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

var classifier = ee.Classifier.decisionTree(treeString)
| improve this answer | |

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.