Skip to content

Commit

Permalink
create new decoding for tree cover gain
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelArcones committed Oct 16, 2023
1 parent 817977f commit 347a565
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion providers/datasets-provider/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,26 @@ const decodes = {
alpha = 1.;
}
}
color.r = red;
color.g = green;
color.b = blue;
`,
treeGain: `
float red = color.r;
float green = color.g;
float blue = color.b;
if (zoom < 12.) {
if (red == 0. && green == 0. && blue == 0.) {
alpha = 0.;
} else {
alpha = alpha * 2.;
}
}
color.r = red;
color.g = green;
color.b = blue;
`,
newCarbonFlux: `
float red = color.r;
float green = color.g;
Expand Down Expand Up @@ -1058,4 +1073,5 @@ export default {
cumulativeCarbonGain: decodes.cumulativeCarbonGain,
netGHGFlux: decodes.netCarbonFlux,
formaAlerts: decodes.forma,
treeGain: decodes.treeGain,
};

0 comments on commit 347a565

Please sign in to comment.