-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Background/Motivation
When a LULC raster appears in a report, it is accompanied by a legend; however, since the legend only maps colors to integer values (not named categories), it is difficult to interpret such a map directly. It might be worthwhile to check for a raster attribute table (RAT) and, if one is available, render it in the report.
Description
For each LULC raster that is rendered in the report and has a RAT, include that RAT as an HTML table in the report. Also include a note (i.e., a "pre-caption") accompanying the LULC maps indicating that RATs (when available) can be found in the report.
Benefits
Including RATs can help users interpret LULC maps in reports. While we neither expect nor encourage users to perform in-depth analysis of rasters as they are rendered in a report, including RATs will provide some context that can help them spot-check results or inputs as they seek to verify a model run or debug an issue.
Alternatives
In an ideal world, we could cross-reference a RAT with the raster itself in order to produce a legend that maps colors to LULC categories (not just their integer values). However, this is impractical in the general case, since the name of the column that stores LULC category names can vary. We could define a specific RAT format that we support (or even go so far as to require that LULC inputs include RATs that adhere to that format), but that seems like a separate issue.
Additional context
This feature is relevant to the Carbon, NDR, and SDR reports, as well as to future reports where LULC rasters are primary inputs.
I had implemented this feature on a branch in the invest-reports repo, but after migrating that branch to the invest repo, the feature stopped working. I haven't yet had the chance to figure out why, so in the interest of getting a dev build ready for internal testing, I decided to de-prioritize this for now. Ideally, it will make it into the 3.18.0 release, but it's OK if it becomes an enhancement in a future release instead.