north-road / slyr

A Python ESRI lyr/style file converter/extracter/parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use value from Raster Attribute Table as defined in .lyr

pvgenuchten opened this issue · comments

Describe the solution you'd like

Since 3.30 QGIS supports Raster Attribute Tables, however when you load a .lyr file with a style based on an attribute, slyr does not pick up the value and uses the band value instead, which causes wrong colors for the pixels

notice the africa_labeledecosystems_90m.zip tif dataset, which includes a rat and a lyr file. the lyr file references an attribute from RAT, however slyr does not set it up at qgis side

Describe alternatives you've considered
map the attribute table values to tiff values

Additional context
requires qgis 3.30+ (or the RAT plugin)

There's a missing part in qgis still - you can't define raster styling using the text values from the RAT. It still requires hardcoded numeric values. That needs to be fixed before we can fully support these lyr files.

@nyalldawson should i create an issue for this on qgis? or is there already an issue?