parevalo / gee-ccdc-tools

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

Cannot generate CCD image #16

Closed JohnKilbride closed 10 months ago

JohnKilbride commented 10 months ago

The following script, taken from the documentation, throws an error:

// First load the API file
var utils = require('users/parevalo_bu/gee-ccdc-tools:ccdcUtilities/api');

// Load the results
var ccdc = ee.Image("projects/GLANCE/RESULTS/CHANGEDETECTION/SA/Rondonia_example");

var inputDate = '2001-12-30';
var dateParams = {inputFormat: 3, inputDate: inputDate, outputFormat: 1};
var formattedDate = utils.Dates.convertDate(dateParams);

// Spectral band names. This list contains all possible bands in this dataset
var BANDS = ['BLUE', 'GREEN', 'RED', 'NIR', 'SWIR1', 'SWIR2', 'TEMP'];

// Names of the temporal segments
var SEGS = ["S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10"];

// Obtain CCDC results in 'regular' ee.Image format
var ccdImage = utils.CCDC.buildCcdImage(ccdc, SEGS.length, BANDS);

print(ccdImage);

The error message reads:

In users/parevalo_bu/gee-ccdc-tools:ccdcUtilities/ccdc.js ee.List.sequence is not a function

parevalo commented 10 months ago

I'm running the exact same code without any issues. Please double check your code or provide a shareable GEE link.

JohnKilbride commented 10 months ago

Interesting, could be a silly error on my end:

https://code.earthengine.google.com/c1354fd7467969faf9b1e3230de59d41

JohnKilbride commented 10 months ago

Alright, that script (which was previously throwing that error) is now working. Maybe a bug related to login (I did close and reopen the browser)? Bizarre.

Thanks for your quick response!