noaa-ocs-hydrography / qgis-raster-attribute-table-plugin

QGIS Raster Attribute Table Plugin
16 stars 4 forks source link

Pre-existing RAT is not identified #15

Closed alpha-beta-soup closed 1 year ago

alpha-beta-soup commented 3 years ago

I have a RAT that is generated alongisde its raster. I am hoping to use this plugin to be able to see the classes (strings) in the QGIS legend, rather than the IDs. However when I add the raster layer to QGIS, there is no notice to say that the RAT is identified, and the layer is not "managed" by the RAT plugin.

I can reproduce this with both GeoTIFF and KEA files.

https://user-images.githubusercontent.com/5925045/127071233-6c76703b-564e-4928-a156-4a2959d3d706.mp4

The RAT file is as follows (with rows 2-97 omitted, but present in reality):

<PAMDataset>
  <PAMRasterBand band="1">
    <GDALRasterAttributeTable tableType="thematic">
      <FieldDefn index="0">
        <Name>final_landuse</Name>
        <Type>2</Type>
        <Usage>2</Usage>
      </FieldDefn>
      <Row index="0">
        <F></F>
      </Row>
      <Row index="1">
        <F>AAA_</F>
      </Row>
      <Row index="98">
        <F>_SBD</F>
      </Row>
    </GDALRasterAttributeTable>
  </PAMRasterBand>
</PAMDataset>
elpaso commented 2 years ago

Hi, is there any chance you could share the test files to reproduce the issue?

What version of QGIS are you using?