Skip to content

Commit 0c9a198

Browse files
Fix encoding of categorical raster data when band interpretation metadata indicates grayscale
1 parent 67e66cf commit 0c9a198

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/spatial-uploads-handler/src/processRasterUpload.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,12 @@ async function encodeValuesToRGB(
315315
)
316316
`,
317317
"temp_b.tif": `
318-
(
319-
floor(
318+
floor(
319+
(
320320
(A - ${base}) * ${1 / interval}
321-
) + 32768.0
322-
) % 256
321+
+ 32768.0
322+
) % 256
323+
)
323324
`,
324325
};
325326

0 commit comments

Comments
 (0)