Anshul Singhvi
Anshul Singhvi
semi works now, but the axis ticks are still wrong. Don't have time to bugfix that at the moment but it can probably go in some other later PR...
This worked with an xml file for me! There's an example in geocompr. Gdal should show the RAT in the dataset's list of files. If it doesn't then it didn't...
As of 2012 GDAL did not recognize DBF files with Rasters, but I have no clue whether that changed in the ~13 years since then https://lists.osgeo.org/pipermail/gdal-dev/2012-September/033995.html Terra actually reads this...
apparently a VAT is an ESRI value attribute table https://support.esri.com/en-us/gis-dictionary/vat#:~:text=%5BEsri%20software%5D%20Acronym%20for%20value,grid https://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/raster-dataset-attribute-tables.htm#:~:text=When%20a%20raster%20attribute%20table,in%20the%20raster%20attribute%20table. https://support.esri.com/en-us/gis-dictionary/attribute-table#:~:text=%5Bdata%20structures%5D%20A%20database%20or,symbolize%20features%20or%20raster%20cells. so I guess they were trying to standard on DBF tables across rasters and shapefiles (side note: why?!)
Ah damn, i forgot its GPL
CategoricalArrays is probably a bad idea here because it forces a dict lookup, where an offset vector would be substantially more efficient. We probably need to write our own.
Oh yeah, the only reason to look at Terra was to see how it detected the files - all the tooling already exists in Julia land :D
But the majority of the work here will be (a) hooking this into Rasters and (b) creating a custom categorical like array, maybe cribbed from IndirectArrays.jl at first, which: -...
Well I was thinking something on the modify level. But ecosystem compat will break either way for the reason you mentioned, so we may as well be efficient. CategoricalArrays does...
Just to note, the way to read this VAT (what a cesspool, indeed) ```julia julia> tab = DBFTables.Tables.columntable(DBFTables.Table("/Users/anshul/Downloads/sub_leaf_type_2021/sub_leaf_type_2021.tif.vat.dbf")) ( VALUE = Union{Missing, Int64}[0, 1, 2, 3], COUNT = Union{Missing, Int64}[679494987,...