0

I have a question.

I have clustered an image collection using the following pipeline in GEE:

  1. Applied clustering algorithm to sentinel imagery.

  2. Mapped LST.

  3. Calculated mean LST value for each cluster using the following line of code:

    lst_cluster=lst.select('LST_Day_1km').addBands(clusters).reduceConnectedComponents(ee.Reducer.mean(), "clusters", 256)

When I use the inspector tool I can get the mean LST value of each cluster.

I tried to only export the lst_cluster to Google Drive but that gives me this error:

Error: Invalid argument: 'collection' must be a FeatureCollection. (Error code: 3)

So I tried to convert it to image collection by combining cluster ID's and LST. But when I am trying to export the mean LST values calculated above for each cluster to google drive using the following line of code:

  task = ee.batch.Export.table.toDrive(
      collection = clus,
      description = 'Mean',
      fileFormat = 'CSV'
  )
  task.start()

I am getting only this in the csv file:

mean

How can I get the LST values for all the cluster in a CSV file?

th145
  • 11
  • 2

0 Answers0