parevalo / gee-ccdc-tools

Tools and Earth Engine apps to interact with the outputs from the CCDC algorithm
MIT License
71 stars 32 forks source link

Image (Error) Parameter 'other' is required. within classifySegments() method #18

Open reaganokothfoliance opened 3 months ago

reaganokothfoliance commented 3 months ago
var samples = ee.FeatureCollection('projects/gee-book/assets/A3-4/sample_with_pred_hansen_2010');
var utils = require('projects/GLANCE:ccdcUtilities/api')

var minObservations = 4;
var chiSquareProbability = 0.97;
var training = samples;
var forestValue = 1;
var startYear = 2010;
var endYear = 2020;
var classBands = ['NDFI', 'GV', 'Shade', 'NPV', 'Soil'];
var prepTraining = false;

//---------------- CODED parameters
var codedParams = {
    minObservations: minObservations,
    chiSquareProbability: chiSquareProbability,
    training: training,
    studyArea: studyArea,
    forestValue: forestValue,
    forestMask: forestMask,
    classBands: classBands,
    collection: landsat,
    startYear: startYear,
    endYear: endYear,
    prepTraining: prepTraining
};

// -------------- Run CODED
var results = api.ChangeDetection.coded(codedParams); // api is loaded correctly and is a variable in the environment.
print(results);

Screenshot 2024-07-17 161632