Skip to content

Commit

Permalink
Merge pull request #3699 from Vizzuality/fix/update-tsc-layer
Browse files Browse the repository at this point in the history
Update map decode config inline with dashboard version
  • Loading branch information
edbrett committed Jan 31, 2019
2 parents 46fdae7 + fa4e76e commit 6178840
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2,290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const decodes = {
1: [244, 29, 54],
2: [239, 211, 26],
3: [47, 191, 113],
4: [173, 54, 36],
4: [173, 104, 36],
5: [178, 53, 204]
};

Expand All @@ -126,11 +126,11 @@ const decodes = {
const lossCat = imgData[pixelPos + 1];
const rgb = lossColors[lossCat || 0];
const intensity = imgData[pixelPos];
const scale = myScale(intensity);
const scale = myScale(intensity) * 2;
imgData[pixelPos] = rgb[0];
imgData[pixelPos + 1] = 72 - z + rgb[1] - 3 * scale / z;
imgData[pixelPos + 2] = 33 - z + rgb[2] - intensity / z;
imgData[pixelPos + 3] = z < 13 ? scale : intensity;
imgData[pixelPos + 1] = rgb[1];
imgData[pixelPos + 2] = rgb[2];
imgData[pixelPos + 3] = scale;
} else {
imgData[pixelPos + 3] = 0;
}
Expand Down

0 comments on commit 6178840

Please sign in to comment.