Skip to content

Commit

Permalink
Choose continuous raster presentation unless number of categories is …
Browse files Browse the repository at this point in the history
…<= 128
  • Loading branch information
underbluewaters committed Oct 7, 2024
1 parent 8b3bca5 commit fec6b3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/spatial-uploads-handler/src/rasterInfoForBands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fec6b3c

Please sign in to comment.