I would like to use JAXA/ALOS/PALSAR/YEARLY/SAR_EPOCH' V2 for HH HV backscatter values and have tried to use epoch band to display date of observation using:

var obsdate = data.select('epoch')

I was hoping that the inspector tool provide data for the difference in days between 2014-05-24 and the observation date.

Has anyone used the epoch band to provide observation date?

1 Answer 1


From the band description, I understand that in the raw data, the date band corresponds to the difference in days between the date the image was acquired and the date 2014-05-24. The epoch band corresponds to the number of milliseconds since midnight on January 1, 1970, UTC.

To obtain the date of the observation at a specific location, you can use the following strategy:

var data = ee.ImageCollection('JAXA/ALOS/PALSAR/YEARLY/SAR_EPOCH');

// Example location.
var pt = ee.Geometry.Point([-57.56, 0.04]);

var getDate = function (pt) {
  var epoch = ee.Image(data.first()).select('epoch');
  var sample = epoch.sample({
    region: pt, 
    scale: epoch.projection().nominalScale(),
    dropNulls: false,
    geometries: false
  sample = ee.Feature(sample.first());
  var date = sample.getNumber('epoch');
  date = ee.Date(date);
  return date;

var date = getDate(pt);

print(date); // Output: Date (2015-12-18 00:00:00)

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.