Skip to content

Hide nodata frame in transformed COGs #4

@mari-s4e

Description

@mari-s4e

When transforming tif files from other CRSs to WGS84 using the transformation script (based on gdal) there is a frame of nodata values. Depending on the nodata value, this can appear in vis.fairicube for example as a white frame surrounding the layer. Example:

Image

One way to solve the issue could be to modify the the transformation script to clip out the nodata frame.

An alternative is to set the nodata value to transparent in the color palette definition file (*.gdaldemrgb). For example, for this asset the nodata value is -9999 and the palette file contents are:

INTERPOLATION:DISCRETE
0.18,247,251,255,0,NoData
0.18361639675688013,247,251,255,255,<= 0.184
0.1914761584173186,226,237,248,255,0.184 - 0.191
0.19652318360632007,205,224,241,255,0.191 - 0.197
0.20085971412133119,175,209,231,255,0.197 - 0.201
0.20510714723349466,137,190,220,255,0.201 - 0.205
0.20948479962674316,96,166,210,255,0.205 - 0.209
0.21458802471600238,62,142,196,255,0.209 - 0.215
0.2220374814135834,34,114,181,255,0.215 - 0.222
0.2423891558630224,10,84,158,255,0.222 - 0.242
inf,8,48,107,255,> 0.242

where the first line 0.18,247,251,255,0,NoData sets all values below 0.18 to transparent

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions