StackComposed

Compute each pixel value of all the images in the input stack for generate the composed of the median, maximum value, pixels valid, last pixel valid and others.

View the Project on GitHub SMByC/StackComposed

StackComposed

The StackComposed compute the stack composed of a specific statistic of band values for several time series of georeferenced data (such as Landsat images), even if these are in different scenes or tiles. The result is a output of statistic compute for all valid pixels values across the time axis (z-axis), in the wrapper extent for all input data in parallels process.

The main aim of this app are:

Process flow

The general process flow is:

Compute the wrapper extent

The wrapper extent is the minimum extent that cover all input images, in this example there are 3 scenes of the images with different position, the wrapper extent is shown in dotted line:

The wrapper extent is the size for the result.

Data cube process

With the wrapper extent then the images are located in a right position in it and put all images in a stack for process, the images are ordered across the time like a cube or a 3D matrix. When compute a statistic, it process all pixel for the wrapper extent, first extract all pixel values in all images in their corresponding position across the z-axis, for some images this position don’t have data, then it return a NaN value that is not included for the statistic.

Parallelization

There are mainly two problems for serial process (no parallel):

For solved it, the StackComposed divide the data cube in equal chunks, each chunks are processes in parallel depends of the number of process assigned. When one chunk is being process, it load only the chunk part for all images and not load the entire image for do it, with this the StackComposed only required a ram memory enough only for the sizes and the number of chunks that are currently being processed in parallel.

How to use

This is a mini guide step by step for use the StackComposed

Recommendation for data input

There are some recommendation for the data input for process, all input images need:

For the moment, the image formats support are: tif, img and ENVI (hdr)

Usage

StackComposed takes some command-line options:

stack-composed -stat STAT -preproc PREPROC -bands BANDS [-p P] [-chunks CHUNKS] [-start DATE] [-end DATE] [-o OUTPUT] 
[-ot dtype] inputs

Chunks sizes

Choosing good values for chunks can strongly impact performance. StackComposed only required a ram memory enough only for the sizes and the number of chunks that are currently being processed in parallel, therefore the chunks sizes going together with the number of process. Here are some general guidelines. The strongest guide is memory:

Filename as metadata

Some statistics or arguments required extra information for each image to process. The StackComposed acquires this extra metadata using parsing of the filename. Currently support two format:

For them extract: landsat version, sensor, path, row, date and julian day.

Issue Tracker

Issues, ideas and enhancements: https://github.com/SMByC/StackComposed/issues

About us

StackComposed was developing, designed and implemented by the Group of Forest and Carbon Monitoring System (SMByC), operated by the Institute of Hydrology, Meteorology and Environmental Studies (IDEAM) - Colombia.

Author and developer: Xavier C. Llano
Theoretical support, tester and product verification: SMByC-PDI group

Contact

Xavier C. Llano: xavier.corredor.llano@gmail.com
SMByC: smbyc (a) ideam.gov.co

License

StackComposed is a free/libre software and is licensed under the GNU General Public License.