0

I defined an image collection contains all landsat SR images(LT5,LE7 and LC8) only including some specific bands each. Finally 685 images in path 120 and row 32, each contains 10 bands were selected.

path = 120
row = 32

start = ee.Date.fromYMD(1983, 1, 1)
finish = ee.Date.fromYMD(2019, 1, 1)

l8_bandlist = ee.List(['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B10', 'pixel_qa'])
rename_list = ee.List(['blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'tbb', 'qa'])

l8_sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR').filter(
ee.Filter.eq('WRS_PATH', path)).filter(ee.Filter.eq('WRS_ROW', row)).filterDate(
    start, finish).select(l8_bandlist, rename_list).sort('system:time_start')

I want to perform a pixel based algorithm to this whole image. I think I have to do it pixel by pixel, but I don't know the way the bands of an image as well as the images in a collection organized in GEE, which means I can't find a way to extract the pixel all band's times series and start the loop.

I tried a lot in searching the solutions. The common way to get a specific location(usually defined by an ee.Geometry.point) time series is using getRegion() function like follows:

info = l8_sr.getRegion(point, 30).getInfo()

I tried to replace the point above with my study area defined by an uploaded shapefile, but received an exception indicates:

**Too many values**: 42622 points x 10 bands x 685 images > 1048576

which seems that a maximum value limitation is set to 1048576 by getRegion function.

I thought it can be solved by getting the time series for one pixel and loop the algorithm pixel by pixel until the whole image been accessed, but I still can't find a way to loop the pixels in image collections as I described above.

For example, how can I get the red band time series (685 observations) of the upper left corner pixel (first pixel?) of the image collection?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.