Open qgis-bot opened 1 year ago
@elpaso @GlenRice-NOAA Can you provide some information/documentation/data on this RAT thing. I looked at the changelog but the information looked minimalist to me. I'd be happy to document this but I'm far from having your background with rasters. I've always thought raster only stored pixel values, so you can imagine...
Well, I think feeding the above points would greatly help. Or if you feel like providing a text for the docs (even as txt), I'd be happier to do the formatting stuffs and integrate.
Thanks in advance.
@DelazJ I can try to explain the main concepts:
The RAT is basically a way to store the raster classification by associating raster values (single values or ranges) with an optional description (label) and can also optionally store a color used to represent the value(s). Additional columns can be used to reclassify the raster, as shown in the sample videos attached where different classes (one for each raster value) are reclassified in fewer classes (for instance all types of trees are merged into a single class).
Some raster formats can store the RAT internally, GDAL can also store the RAT in the .aux.xml file and some softwares (including now QGIS) can import/export the RAT from/to a DBF file.
The RAT data model is based on the GDAL implementation, to be honest I have extensively looked for specifications or documentation about the RAT when developing the RAT plugins firsts and the C++ implementation more recently and I was surprised by the total lack of it (or my inability to find it), my understanding of the RAT data model originates mainly from samples taken from GDAL and from NOAA who financed the work.
Now, coming to the column types, GDAL defines a few column roles and data types that are stored in the .aux.xml and are used to understand the role of the column, for example a column can have a specific role (see : https://gdal.org/doxygen/gdal_8h.html#a27bf786b965d5227da1acc2a4cab69a1 ) which is useful to know what is the purpose of the column and what you can do with that column (e.g. if it is a part of a color definition or the column containing the values for the classification or the labels etc.).
The relation with the symbology tab does exist because the paletted or singleband pseudocolor styles can be created from a RAT (actually they are automatically when the raster is loaded and it comes with a RAT) and a RAT can be created and exported from paletted or singleband pseudocolor styles, this should also answer to your question n. 1.
I hope this helps to clarify but feel free to ping me if you have further questions.
Hi, Thank you for adding RAT to the QGIS core. I just tried with GeoTiffs to create a RAT. It works, but I cannot create a vat.tbf. Even if I chose this option an .aux.xml file created. Further I cannot edit the table. It is enabled. What could be the Problem? I use QGIS 3.34.2 on Win10. Thank you
Hi, Thank you for adding RAT to the QGIS core. I just tried with GeoTiffs to create a RAT. It works, but I cannot create a vat.tbf. Even if I chose this option an .aux.xml file created. Further I cannot edit the table. It is enabled. What could be the Problem? I use QGIS 3.34.2 on Win10. Thank you
Request for documentation
From pull request QGIS/qgis#50687 Author: @elpaso QGIS version: 3.30
Raster Attribute Table GUI
PR Description:
Raster Attribute Table GUI
Here are a few examples about different use cases and workflows:
Automatic creation of style from a RAT when adding a raster to the project
Automatic loading works for both embedded RATs and sidecar VAT.DBF with same basename of the raster.
RAT reclassification
Reclassification of a raster based on a different column
RAT Identify
Values from the RAT row corresponding to the pixel value are shown in identify
RAT Properties
RAT is also available in the raster properties.
RAT editing
RATs offer basic editing capabilities
RAT creation from current classification
RATs can be created from paletted or singleband pseudocolor styles:
Commits tagged with [need-docs] or [FEATURE]