Open S-AQ opened 3 years ago
The date for the annual medoid composites is hard coded. See line https://github.com/eMapR/LT-GEE/blob/8e38e0f5bb8813b42521fd9f8633eba5514b5674/LandTrendr.js#L217
The comment says August first, but the month parameters for the Date
function is 0-based month index, not month number. It's a little strange that the formatted acquisition_date
is August 31st, I'd expect it to be September 1st, issue is likely due to time zones.
A better solution here would be to use the median date of the images in the composite and also maybe add a property to the annual composites listing the dates of all of the images used in a given composite.
I'll keep this issue open and implement a change for better date assignment. Thanks for bring this to our attention!
In update 14.11 on 2018-06-13, you wrote that you improved the
buildSRcollection
function to account for the medoid image of the growing season of the southern hemisphere. The theory was that as long as you take thestartDay
later in the year than theendDay
, you would result in a medoid image collection consisting of acquisition dates somewhere in January for example.I ran the following code snippet that was published along with the update, but it did not result in acquisition dates in the southern summer.
But the code returns an image collection where all images are taken around August 31st
Why does it do that?
Could it have anything to do with the hardcoded date of August 1st in lines 217 and 205?
line 205:
.set('system:time_start', (new Date(year,8,1)).valueOf()); // add the year to each medoid image - the data is hard-coded Aug 1st
line 217:
imgs = imgs.concat(tmp.set('system:time_start', (new Date(i,8,1)).valueOf())); // concatenate the annual image medoid to the collection (img) and set the date of the image - hard coded to the year that is being worked on for Aug 1st