[gdal-dev] RAT for VRT

Even Rouault even.rouault at mines-paris.org
Fri Oct 11 01:51:34 PDT 2013


Markus,

>
> I need support for Raster Attribute Tables (RAT) when using the GDAL virtual
> format (VRT). It seems that the current VRT driver does not support RATs. I
> would like to know if:
> - I am correct on the above assumption?

Yes.

> - If I am, are there any plans to extend the VRT driver to support RATs?

There have been some related discussions in
http://trac.osgeo.org/gdal/ticket/4903 . But for large RAT, which was the
rationale for RFC 40, serializing RAT as XML in the VRT would be inappropriate.

> - other people have the same problem and are interested in solving it.
>
>
> I am aware that RAT support for VRT poses some challenges as VRT files only
> reference other files and don't include data itself.

PAM .aux.xml files already support serialized RAT, so technically RAT in VRT
would be possible for RAT of reasonnable sizes


> A virtual RAT is only
> easy to implement if all referenced tiles use the same RAT. In case the RATs
> were different, i.e. reduced to the rows that are needed for a specific tile,
> then a virtual RAT would have to be created out of all referenced RATs or
> (somehow like a cache) the virtual RAT would have to be created at the time
> of the creation of the VRT file and then stored alongside it.

RAT in the context of a mosaic of tiles is another story. For reference, for
color tables, gdalbuildvrt takes the color table of the first tile, and then
strictly checks that all the tiles have the same number of entries, and softly
warn if the entries are different (but this will likely result in ugly visual
result most of the time). Managing non identical RATs in the context of an
assembly of tiles is not going to be easier...

Best regards,

Even




More information about the gdal-dev mailing list