Stay organized with collections
Save and categorize content based on your preferences.
Accumulates elements of each array pixel along the given axis, by setting each element of the result array pixel to the reduction of elements in that pixel along the given axis, up to and including the current position on the axis. May be used to make a cumulative sum, a monotonically increasing sequence, etc.
Usage
Returns
Image.arrayAccum(axis, reducer)
Image
Argument
Type
Details
this: input
Image
Input image.
axis
Integer
Axis along which to perform the cumulative sum.
reducer
Reducer, default: null
Reducer to accumulate values. Default is SUM, to produce the cumulative sum of each vector along the given axis.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["`Image.arrayAccum()` calculates the cumulative reduction of elements within each pixel of an array image along a specified axis."],["It uses a reducer (defaulting to sum) to determine how elements are accumulated, producing a new array image."],["The axis argument specifies the direction of accumulation (0 for rows, 1 for columns in 2D arrays)."],["This function is useful for generating cumulative sums, monotonically increasing sequences, and other cumulative calculations within array images."],["It's applicable to both 1D and multidimensional array images in Earth Engine."]]],[]]