0

I am trying to get a calendar date from two bands in an image that look like this: enter image description here

The first band in the image is the Julian Date (an integer from 0 to 365), and the second band in the image is the year, which is a constant in this situation.

What I would like to do is tell EE, for each pixel in the image, take Julian date from first band and year from second band, and give me a third band in the date format DDD-yyyy.

1 Answer 1

0

The format DDD-yyyy is not possible, since you can not save strings in image pixels. However DDDyyyy is possible and can be achieved something like this, where im is your image with the date bands:

doyyear = im.select("julianDate").multiply(10000).add(im.select("year")).rename("doyyear")

im = im.addBands(doyyear)

Your Answer

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

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