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

sensor argument in getLandsat() function does not work #10

Open ZZMitch opened 2 years ago

ZZMitch commented 2 years ago

Hello,

The sensors argument in the getLandsat() function does not properly filter by Satellite (l4, l5, l7, l8). The function will output all sensors, even if all sensors are set to false.

Looking into the source code, this error is likely because the filterMetadata command below is looking for a 'SATELLITE' property. However, at least in Collection 2, there is no 'SATELLITE' property. The correct property instead appears to be 'SPACECRAFT_ID'.

A simple change of replacing 'SATELLITE' with 'SPACECRAFT_ID' should fix this issue.