2

I try to apply an expression to the satellite image and then try to chart the mean of the series of images but I'm getting this error:

"Error generating chart: No features contain non-null values of "system:time_start"

Link to the code: https://code.earthengine.google.com/c977a6ea5b61ec830b15835036e64c97

Code:

var app = function (image)
{
var conv = image.expression(
    'band/(4.4615*10**-4)',  //formula for coverting mol/m2 to DU(Dobson)
    {
        band: image.select('SO2_column_number_density'),   
  });

return  conv;
};

// Load the sentinel data
var sentinel = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_SO2')
.filterDate('2019-04-01', '2019-04-21')
.map(app)


//Identify country
var region = ee.FeatureCollection("ft:1p_3AqEj1T9fG0BNu6pGqmP6_HdDOalruzpk54Ne8");
Map.addLayer(region);

Map.addLayer(sentinel)



var TS5 = Chart.image.series(sentinel, region, ee.Reducer.mean(),1000, 'system:time_start').setOptions({
          title: 'pollutants Full Time Series',
          vAxis: {title: 'mol/m2'},
});
print(TS5);

3 Answers 3

2

using an image expression, the image will losse it's original properties. Copy the properties of the source (image) to the new image (conv):

var app = function (image)
{
var conv = image.expression(
    'band/(4.4615*10**-4)',  //formula for coverting mol/m2 to DU(Dobson)
    {
        band: image.select('SO2_column_number_density'),   
  });

return  ee.Image(conv.copyProperties(image)).set('system:time_start', image.get('system:time_start'));
};
2
  • Thank you very much that was very helpful. May 7, 2019 at 13:08
  • @MubeenShafqat kindly accept the answer if it solved your problem.
    – Padmanabha
    Sep 17, 2023 at 11:12
1

This has helped me too. I was unable to plot my time series of NDVI due to the same error. I narrowed it down to the part of my code where there is a mathematical calculation

 return image.updateMask(mask).divide(10000)

}

I fixed it by changing it to

  return image.updateMask(mask).divide(10000).copyProperties(image).set('system:time_start', image.get('system:time_start'));

}

Works perfectly now.

0

I just tried the same thing and had to copy Sentinel's system:index into system:time_start to make it work.

.copyProperties(image).set({'system:time_start', image.get('system:index')});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.