Skip to content

Conversation

@blacha
Copy link
Member

@blacha blacha commented Jan 21, 2025

Motivation

We are getting datasets that have other datatypes than float32 that need to be expanded into 4 band RGBA so basemaps can render them.

A common type is a one band uint8 which is generally a grey scale dataset which can be directly band expanded from 0 to r:0, g:0, b:0, alpha: 255 and 255 to r:255, g:255, b:255, alpha: 255

Modifications

Added support for uint8 and uint32 with the tiler piplines

TODO: it would be nicer to handle the datatypes more generically, to hopefully avoid giant switch case statements, we should in theory be able to trust that lerc gives us the correct typed array for instance.

Verification

Added unit tests and rendered it locally

image

@blacha blacha marked this pull request as ready for review January 21, 2025 23:56
@blacha blacha requested a review from a team as a code owner January 21, 2025 23:56
@tawera-manaena
Copy link
Contributor

@blacha blacha added this pull request to the merge queue Jan 22, 2025
@blacha
Copy link
Member Author

blacha commented Jan 22, 2025

Screenshots are "broken" due to the new released screenshot version linz/basemaps-screenshot@eaf8713

Merged via the queue into master with commit f316042 Jan 22, 2025
11 of 12 checks passed
@blacha blacha deleted the feat/support-u8-and-u32-color-ramp branch January 22, 2025 01:07
@blacha blacha changed the title feat(tiler-sharp): support uint32 and uint8 source datasets for color-ramp feat(tiler-sharp): support uint32 and uint8 source datasets for color-ramp BM-1178 Jan 26, 2025
@blacha blacha mentioned this pull request Jan 26, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 26, 2025
# [7.14.0](v7.13.0...v7.14.0)
(2025-01-26)


### Bug Fixes

* **infra:** correct dist path location
([#3390](#3390))
([46f8fb8](46f8fb8))
* revert "build: maplibre v5.0.0
([#3387](#3387))"
([#3394](#3394))
([d441be2](d441be2))
* **tiler-sharp:** when resampling uint round numbers rather than
truncate ([#3392](#3392))
([d02e56f](d02e56f))


### Features

* **cogify:** add background color support for overriding transparent
pixels BM-1146 ([#3379](#3379))
([b8bedc3](b8bedc3))
* improved cloudwatch analytics rollup BM-1092
([#3381](#3381))
([de2f295](de2f295))
* **tiler-sharp:** support uint32 and uint8 source datasets for
color-ramp ([#3391](#3391))
([f316042](f316042))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants