addVat | R Documentation |
This function creates a new sidecar file next to x
which contains a
value attribute table (VAT). A VAT is used by ESRI GIS software to encode
additional information about each value in a classified integer raster.
addVat(x, attributes, skipCount = FALSE)
x |
the path to a geoTIFF file; use with other raster formats is untested. |
attributes |
a |
skipCount |
if TRUE then this function will assume that all values in
the grid are represented in |
It calls terra::freq()
to generate a table of values and
frequencies from the raster x
which can take a long time for large
files. It should only be called on integer encoded files.
A VAT is a a dbf file with "VALUE" and "COUNT" fields containing all the
unique values and their associated frequency in the raster file. The VAT
file's name will be the name of the image file with ".vat.dbf" appended;
for a tif this means the file will end in ".tif.vat.dbf".
The column names in a .dbf file are restricted to 11 characters and
cannot contain periods;
for detailed limitations see foreign::write.dbf()
which is used to write the VAT.
This function creates a VAT file but returns nothing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.