I am currently reading up on the linearFit() and linearRegression() in GEE. I was looking at the developer guide for these functions, which I think I understood correctly, except for the way in which the outputs are added to the map. Once the linear regression or fit is performed the outputs are plotted as an RGB image assigning R and B to 'scale', and G to 'offset', like this:

  {min: 0, max: [-0.9, 8e-5, 1], bands: ['scale', 'offset', 'scale']}, 'fit');

According to the guide the resulting map shows areas of increasing trend in blue, decreasing trend in red and no trend in green, which seems simple enough but I don't understand how the max and min values were chosen, or the point of using and RGB composite is, versus, for example, just plotting 'scale' with any given palette.

enter image description here

  • min and max values in this context are only relevant for your visualization. They define what are the min and max values used to stretch the color of the image visualization. You can play around with the image visualization parameters directly in the map by clicking the icon next to the layer in the layers list. My suggestion is that first, you try to understand what is the information on each band ('scale' and 'offset'). Once that is clear to you, you will be able to understand the information displayed in this RGB composite.
    – Oscar
    May 26 at 19:41
  • I know what the min and max are for in general, how RGB images work, and what scale and offset mean. I just don't understand how and why these values were chosen and what the point of an RGB visualization is. You answered none of these questions. But thanks, I guess.
    – Madeleine
    May 27 at 20:11

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.