From fec6b3cf1fcefb9fec359b0b069aef9021bbde9b Mon Sep 17 00:00:00 2001 From: Chad Burt Date: Mon, 7 Oct 2024 11:15:17 -0700 Subject: [PATCH] Choose continuous raster presentation unless number of categories is <= 128 --- packages/spatial-uploads-handler/src/rasterInfoForBands.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/spatial-uploads-handler/src/rasterInfoForBands.ts b/packages/spatial-uploads-handler/src/rasterInfoForBands.ts index 84b7463a..760f17c7 100644 --- a/packages/spatial-uploads-handler/src/rasterInfoForBands.ts +++ b/packages/spatial-uploads-handler/src/rasterInfoForBands.ts @@ -350,7 +350,11 @@ export async function rasterInfoForBands( info.bands[0].stats.categories.length > 0 && !isRGB ) { - info.presentation = SuggestedRasterPresentation.categorical; + if (info.bands[0].stats.categories.length <= 128) { + info.presentation = SuggestedRasterPresentation.categorical; + } else { + info.presentation = SuggestedRasterPresentation.continuous; + } } return info; }