GDAL

Classes | Public Member Functions | Static Public Member Functions | List of all members
GDALDefaultRasterAttributeTable Class Reference

Raster Attribute Table container. More...

`#include <gdal_rat.h>`

Inheritance diagram for GDALDefaultRasterAttributeTable:

## Public Member Functions
| GDALDefaultRasterAttributeTable ()
| Construct empty table.
GDALDefaultRasterAttributeTable * | Clone () const override
| Copy Raster Attribute Table.
int | GetColumnCount () const override
| Fetch table column count.
const char * | GetNameOfCol (int) const override
| Fetch name of indicated column.
GDALRATFieldUsage | GetUsageOfCol (int) const override
| Fetch column usage value.
GDALRATFieldType | GetTypeOfCol (int) const override
| Fetch column type.
int | GetColOfUsage (GDALRATFieldUsage) const override
| Return the index of the column that corresponds to the passed usage.
int | GetRowCount () const override
| Fetch row count.
const char * | GetValueAsString (int iRow, int iField) const override
| Fetch field value as a string.
int | GetValueAsInt (int iRow, int iField) const override
| Fetch field value as a integer.
double | GetValueAsDouble (int iRow, int iField) const override
| Fetch field value as a double.
bool | GetValueAsBoolean (int iRow, int iField) const override
| Fetch field value as a boolean.
GDALRATDateTime | GetValueAsDateTime (int iRow, int iField) const override
| Fetch field value as a datetime.
const GByte * | GetValueAsWKBGeometry (int iRow, int iField, size_t &nWKBSize) const override
| Fetch field value as a WKB geometry.
CPLErr | SetValue (int iRow, int iField, const char *pszValue) override
| Set value.
CPLErr | SetValue (int iRow, int iField, double dfValue) override
| Set field value from double.
CPLErr | SetValue (int iRow, int iField, int nValue) override
| Set field value from integer.
CPLErr | SetValue (int iRow, int iField, bool bValue) override
| Set field value from boolean.
CPLErr | SetValue (int iRow, int iField, const GDALRATDateTime &sDateTime) override
| Set field value from datetime.
CPLErr | SetValue (int iRow, int iField, const void *pabyWKB, size_t nWKBSize) override
| Set field value from a WKB geometry.
int | ChangesAreWrittenToFile () override
| Determine whether changes made to this RAT are reflected directly in the dataset.
void | SetRowCount (int iCount) override
| Set row count.
int | GetRowOfValue (double dfValue) const override
| Get row for pixel value.
int | GetRowOfValue (int nValue) const override
| Get row for pixel value.
CPLErr | CreateColumn (const char *pszFieldName, GDALRATFieldType eFieldType, GDALRATFieldUsage eFieldUsage) override
| If the table already has rows, all row values for the new column will be initialized to the default value ("", or zero).
CPLErr | SetLinearBinning (double dfRow0Min, double dfBinSize) override
| Set linear binning information.
int | GetLinearBinning (double *pdfRow0Min, double *pdfBinSize) const override
| Get linear binning information.
CPLErr | SetTableType (const GDALRATTableType eInTableType) override
| Set RAT Table Type.
GDALRATTableType | GetTableType () const override
| Get RAT Table Type.
void | RemoveStatistics () override
| Remove Statistics from RAT.
virtual CPLErr | ValuesIO (GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, double *pdfData)
| Read or Write a block of doubles to/from the Attribute Table.
virtual CPLErr | ValuesIO (GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, int *pnData)
| Read or Write a block of integers to/from the Attribute Table.
virtual CPLErr | ValuesIO (GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, char **papszStrList)
| Read or Write a block of strings to/from the Attribute Table.
virtual CPLErr | ValuesIO (GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, bool *pbData)
| Read or Write a block of booleans to/from the Attribute Table.
virtual CPLErr | ValuesIO (GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, GDALRATDateTime *pasDateTime)
| Read or Write a block of DateTime to/from the Attribute Table.
virtual CPLErr | ValuesIO (GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, GByte **ppabyWKB, size_t *pnWKBSize)
| Read or Write a block of WKB-encoded geometries to/from the Attribute Table.
virtual CPLXMLNode * | Serialize () const
| Serialize.
virtual void * | SerializeJSON () const
| Serialize as a JSON object.
virtual CPLErr | XMLInit (const CPLXMLNode *, const char *)
| Deserialize from XML.
virtual CPLErr | InitializeFromColorTable (const GDALColorTable *)
| Initialize from color table.
virtual GDALColorTable * | TranslateToColorTable (int nEntryCount=-1)
| Translate to a color table.
virtual void | DumpReadable (FILE *=nullptr)
| Dump RAT in readable form.

## Static Public Member Functions
static GDALRasterAttributeTableH | ToHandle (GDALRasterAttributeTable *poRAT)
| Convert a GDALRasterAttributeTable* to a GDALRasterAttributeTableH.
static GDALRasterAttributeTable * | FromHandle (GDALRasterAttributeTableH hRAT)
| Convert a GDALRasterAttributeTableH to a GDALRasterAttributeTable*.

## Detailed Description

Raster Attribute Table container.

## Member Function Documentation

## ◆ ChangesAreWrittenToFile()

int GDALDefaultRasterAttributeTable::ChangesAreWrittenToFile | ( |  | ) |
| override virtual

Determine whether changes made to this RAT are reflected directly in the dataset.

If this returns FALSE then GDALRasterBand.SetDefaultRAT() should be called. Otherwise this is unnecessary since changes to this object are reflected in the dataset.

This method is the same as the C function GDALRATChangesAreWrittenToFile().

Implements GDALRasterAttributeTable.

## ◆ Clone()

GDALDefaultRasterAttributeTable * GDALDefaultRasterAttributeTable::Clone | ( |  | ) | const
| override virtual

Copy Raster Attribute Table.

Creates a new copy of an existing raster attribute table. The new copy becomes the responsibility of the caller to destroy. May fail (return nullptr) if the attribute table is too large to clone (GetRowCount() * GetColCount() > RAT_MAX_ELEM_FOR_CLONE)

This method is the same as the C function GDALRATClone().

Returns
  new copy of the RAT as an in-memory implementation.

Implements GDALRasterAttributeTable.

## ◆ CreateColumn()

CPLErr GDALDefaultRasterAttributeTable::CreateColumn | ( | const char * | pszFieldName,
|  | GDALRATFieldType | eFieldType,
|  | GDALRATFieldUsage | eFieldUsage
| ) |  |
| override virtual

If the table already has rows, all row values for the new column will be initialized to the default value ("", or zero).

The new column is always created as the last column, and will be column (field) "GetColumnCount()-1" after CreateColumn() has completed successfully.

This method is the same as the C function GDALRATCreateColumn().

Parameters

  pszFieldName | the name of the field to create.
  eFieldType | the field type (integer, double or string).
  eFieldUsage | the field usage, GFU_Generic if not known.

Returns
  CE_None on success or CE_Failure if something goes wrong.

Reimplemented from GDALRasterAttributeTable.

## ◆ DumpReadable()

void GDALRasterAttributeTable::DumpReadable | ( | FILE * | fp = `nullptr` | ) |
| virtual inherited

Dump RAT in readable form.

Currently the readable form is the XML encoding ... only barely readable.

This method is the same as the C function GDALRATDumpReadable().

Parameters

  fp | file to dump to or NULL for stdout.

## ◆ GetColOfUsage()

int GDALDefaultRasterAttributeTable::GetColOfUsage | ( | GDALRATFieldUsage | eUsage | ) | const
| override virtual

Return the index of the column that corresponds to the passed usage.

Parameters

  eUsage | usage.

Returns
  column index, or -1 in case of error.

Implements GDALRasterAttributeTable.

## ◆ GetColumnCount()

int GDALDefaultRasterAttributeTable::GetColumnCount | ( |  | ) | const
| override virtual

Fetch table column count.

This method is the same as the C function GDALRATGetColumnCount().

Returns
  the number of columns.

Implements GDALRasterAttributeTable.

## ◆ GetLinearBinning()

int GDALDefaultRasterAttributeTable::GetLinearBinning | ( | double * | pdfRow0Min,
|  | double * | pdfBinSize
| ) |  | const
| override virtual

Get linear binning information.

Returns linear binning information if any is associated with the RAT.

This method is the same as the C function GDALRATGetLinearBinning().

Parameters

  pdfRow0Min | (out) the lower bound (pixel value) of the first category.
  pdfBinSize | (out) the width of each category (in pixel value units).

Returns
  TRUE if linear binning information exists or FALSE if there is none.

Reimplemented from GDALRasterAttributeTable.

## ◆ GetNameOfCol()

const char * GDALDefaultRasterAttributeTable::GetNameOfCol | ( | int | iCol | ) | const
| override virtual

Fetch name of indicated column.

Parameters

  iCol | column index.

Returns
  name.

Implements GDALRasterAttributeTable.

## ◆ GetRowCount()

int GDALDefaultRasterAttributeTable::GetRowCount | ( |  | ) | const
| override virtual

Fetch row count.

This method is the same as the C function GDALRATGetRowCount().

Returns
  the number of rows.

Implements GDALRasterAttributeTable.

## ◆ GetRowOfValue() [1/2]

int GDALDefaultRasterAttributeTable::GetRowOfValue | ( | double | dfValue | ) | const
| override virtual

Get row for pixel value.

Given a raw pixel value, the raster attribute table is scanned to determine which row in the table applies to the pixel value. The row index is returned.

This method is the same as the C function GDALRATGetRowOfValue().

Parameters

  dfValue | the pixel value.

Returns
  the row index or -1 if no row is appropriate.

Reimplemented from GDALRasterAttributeTable.

## ◆ GetRowOfValue() [2/2]

int GDALDefaultRasterAttributeTable::GetRowOfValue | ( | int | nValue | ) | const
| override virtual

Get row for pixel value.

Given a raw pixel value, the raster attribute table is scanned to determine which row in the table applies to the pixel value. The row index is returned.

Int arg for now just converted to double. Perhaps we will handle this in a special way some day?

This method is the same as the C function GDALRATGetRowOfValue().

Parameters

  nValue | the pixel value.

Returns
  the row index or -1 if no row is appropriate.

Reimplemented from GDALRasterAttributeTable.

## ◆ GetTableType()

GDALRATTableType GDALDefaultRasterAttributeTable::GetTableType | ( |  | ) | const
| override virtual

Get RAT Table Type.

Returns whether table type is thematic or athematic

This method is the same as the C function GDALRATGetTableType().

Returns
  GRTT_THEMATIC or GRTT_ATHEMATIC

Implements GDALRasterAttributeTable.

## ◆ GetTypeOfCol()

GDALRATFieldType GDALDefaultRasterAttributeTable::GetTypeOfCol | ( | int | iCol | ) | const
| override virtual

Fetch column type.

Parameters

  iCol | column index.

Returns
  type.

Implements GDALRasterAttributeTable.

## ◆ GetUsageOfCol()

GDALRATFieldUsage GDALDefaultRasterAttributeTable::GetUsageOfCol | ( | int | iCol | ) | const
| override virtual

Fetch column usage value.

Parameters

  iCol | column index.

Returns
  usage.

Implements GDALRasterAttributeTable.

## ◆ GetValueAsBoolean()

bool GDALDefaultRasterAttributeTable::GetValueAsBoolean | ( | int | iRow,
|  | int | iField
| ) |  | const
| override virtual

Fetch field value as a boolean.

The value of the requested column in the requested row is returned as a boolean. This method is nominally called on fields of type GFT_Boolean, but it can be called on fields of other types as well. Non boolean fields will be converted to boolean with the possibility of data loss.

This method is the same as the C function GDALRATGetValueAsBoolean().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).

Returns
  field value

Since
  3.12

Implements GDALRasterAttributeTable.

## ◆ GetValueAsDateTime()

GDALRATDateTime GDALDefaultRasterAttributeTable::GetValueAsDateTime | ( | int | iRow,
|  | int | iField
| ) |  | const
| override virtual

Fetch field value as a datetime.

The value of the requested column in the requested row is returned as a datetime. Besides being called on a GFT_DateTime field, it is also possible to call this method on a string field that contains a ISO-8601 encoded datetime.

This method is the same as the C function GDALRATGetValueAsDateTime().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).

Returns
  field value

Since
  3.12

Implements GDALRasterAttributeTable.

## ◆ GetValueAsDouble()

double GDALDefaultRasterAttributeTable::GetValueAsDouble | ( | int | iRow,
|  | int | iField
| ) |  | const
| override virtual

Fetch field value as a double.

The value of the requested column in the requested row is returned as a double. This method is nominally called on fields of type GFT_Real, but it can be called on fields of other types as well. Non double fields will be converted to double with the possibility of data loss.

This method is the same as the C function GDALRATGetValueAsDouble().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).

Returns
  field value

Implements GDALRasterAttributeTable.

## ◆ GetValueAsInt()

int GDALDefaultRasterAttributeTable::GetValueAsInt | ( | int | iRow,
|  | int | iField
| ) |  | const
| override virtual

Fetch field value as a integer.

The value of the requested column in the requested row is returned as an integer. This method is nominally called on fields of type GFT_Integer, but it can be called on fields of other types as well. Non-integer fields will be converted to integer with the possibility of data loss.

This method is the same as the C function GDALRATGetValueAsInt().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).

Returns
  field value

Implements GDALRasterAttributeTable.

## ◆ GetValueAsString()

const char * GDALDefaultRasterAttributeTable::GetValueAsString | ( | int | iRow,
|  | int | iField
| ) |  | const
| override virtual

Fetch field value as a string.

The value of the requested column in the requested row is returned as a string. This method is nominally called on fields of type GFT_String, but it can be called on fields of other types as well. If the field is numeric, it is formatted as a string using default rules, so some precision may be lost.

The returned string is temporary and cannot be expected to be available after the next GDAL call.

This method is the same as the C function GDALRATGetValueAsString().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).

Returns
  field value.

Implements GDALRasterAttributeTable.

## ◆ GetValueAsWKBGeometry()

const GByte * GDALDefaultRasterAttributeTable::GetValueAsWKBGeometry | ( | int | iRow,
|  | int | iField,
|  | size_t & | nWKBSize
| ) |  | const
| override virtual

Fetch field value as a WKB geometry.

The value of the requested column in the requested row is returned as a WKB geometry. Besides being called on a GFT_WKBGeometry field, it is also possible to call this method on a string field that contains a WKT encoded geometry.

The returned pointer may be invalidated by a following call to a method of this GDALRasterAttributeTable instance.

This method is the same as the C function GDALRATGetValueAsWKBGeometry().

Parameters

  | iRow | row to fetch (zero based).
  | iField | column to fetch (zero based).
  [out] | nWKBSize | Number of bytes of the returned pointer

Returns
  field value, or nullptr

Since
  3.12

Implements GDALRasterAttributeTable.

## ◆ InitializeFromColorTable()

CPLErr GDALRasterAttributeTable::InitializeFromColorTable | ( | const GDALColorTable * | poTable | ) |
| virtual inherited

Initialize from color table.

This method will setup a whole raster attribute table based on the contents of the passed color table. The Value (GFU_MinMax), Red (GFU_Red), Green (GFU_Green), Blue (GFU_Blue), and Alpha (GFU_Alpha) fields are created, and a row is set for each entry in the color table.

The raster attribute table must be empty before calling InitializeFromColorTable().

The Value fields are set based on the implicit assumption with color tables that entry 0 applies to pixel value 0, 1 to 1, etc.

This method is the same as the C function GDALRATInitializeFromColorTable().

Parameters

  poTable | the color table to copy from.

Returns
  CE_None on success or CE_Failure if something goes wrong.

## ◆ RemoveStatistics()

void GDALDefaultRasterAttributeTable::RemoveStatistics | ( |  | ) |
| override virtual

Remove Statistics from RAT.

Remove statistics (such as histogram) from the RAT. This is important if these have been invalidated, for example by cropping the image.

This method is the same as the C function GDALRATRemoveStatistics().

Implements GDALRasterAttributeTable.

## ◆ Serialize()

CPLXMLNode * GDALRasterAttributeTable::Serialize | ( |  | ) | const
| virtual inherited

Serialize.

Serialize as a XML tree.

May fail (return nullptr) if the attribute table is too large to serialize (GetRowCount() * GetColCount() > RAT_MAX_ELEM_FOR_CLONE)

Returns
  XML tree.

## ◆ SerializeJSON()

void * GDALRasterAttributeTable::SerializeJSON | ( |  | ) | const
| virtual inherited

Serialize as a JSON object.

Returns
  JSON object (of type json_object*)

## ◆ SetLinearBinning()

CPLErr GDALDefaultRasterAttributeTable::SetLinearBinning | ( | double | dfRow0MinIn,
|  | double | dfBinSizeIn
| ) |  |
| override virtual

Set linear binning information.

For RATs with equal sized categories (in pixel value space) that are evenly spaced, this method may be used to associate the linear binning information with the table.

This method is the same as the C function GDALRATSetLinearBinning().

Parameters

  dfRow0MinIn | the lower bound (pixel value) of the first category.
  dfBinSizeIn | the width of each category (in pixel value units).

Returns
  CE_None on success or CE_Failure on failure.

Reimplemented from GDALRasterAttributeTable.

## ◆ SetRowCount()

void GDALDefaultRasterAttributeTable::SetRowCount | ( | int | nNewCount | ) |
| override virtual

Set row count.

Parameters

  nNewCount | new count.

Reimplemented from GDALRasterAttributeTable.

## ◆ SetTableType()

CPLErr GDALDefaultRasterAttributeTable::SetTableType | ( | const GDALRATTableType | eInTableType | ) |
| override virtual

Set RAT Table Type.

Set whether table type is thematic or athematic

This method is the same as the C function GDALRATSetTableType().

Parameters

  eInTableType | the new RAT table type (GRTT_THEMATIC or GRTT_ATHEMATIC)

Returns
  CE_None on success or CE_Failure on failure.

Implements GDALRasterAttributeTable.

## ◆ SetValue() [1/6]

CPLErr GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow,
|  | int | iField,
|  | bool | bValue
| ) |  |
| override virtual

Set field value from boolean.

The indicated field (column) on the indicated row is set from the passed value. This method is nominally called on fields of type GFT_Boolean, but it can be called on fields of other types as well. The value will be automatically converted for other field types, with a possible loss of precision.

This method is the same as the C function GDALRATSetValueAsBoolean().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).
  bValue | the value to assign.

Returns
  CE_None in case of success, error code otherwise

Since
  3.12

Implements GDALRasterAttributeTable.

## ◆ SetValue() [2/6]

CPLErr GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow,
|  | int | iField,
|  | const char * | pszValue
| ) |  |
| override virtual

Set value.

Parameters

  iRow | row index.
  iField | field index.
  pszValue | value.

Implements GDALRasterAttributeTable.

## ◆ SetValue() [3/6]

CPLErr GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow,
|  | int | iField,
|  | const GDALRATDateTime & | sDateTime
| ) |  |
| override virtual

Set field value from datetime.

The indicated field (column) on the indicated row is set from the passed value. Besides being called on a field of type GFT_DateTime, this method can also be called on a field of type GFT_String, in which case the datetime will be converted into its ISO-8601 representation.

Note that the GDALRATDateTime::bIsValid field must be set to true if the date time is valid.

This method is the same as the C function GDALRATSetValueAsDateTime().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).
  sDateTime | Date time value

Returns
  CE_None in case of success, error code otherwise

Since
  3.12

Implements GDALRasterAttributeTable.

## ◆ SetValue() [4/6]

CPLErr GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow,
|  | int | iField,
|  | const void * | pabyWKB,
|  | size_t | nWKBSize
| ) |  |
| override virtual

Set field value from a WKB geometry.

The indicated field (column) on the indicated row is set from the passed value. Besides being called on a field of type GFT_WKBGeometry, this method can also be called on a field of type GFT_String, in which case the datetime will be converted into its WKT geometry representation.

This method is the same as the C function GDALRATSetValueAsWKBGeometry().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).
  pabyWKB | Pointer to a WKB encoded geometry
  nWKBSize | Number of bytes of pabyWKB.

Returns
  CE_None in case of success, error code otherwise

Since
  3.12

Implements GDALRasterAttributeTable.

## ◆ SetValue() [5/6]

CPLErr GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow,
|  | int | iField,
|  | double | dfValue
| ) |  |
| override virtual

Set field value from double.

The indicated field (column) on the indicated row is set from the passed value. This method is nominally called on fields of type GFT_Real, but it can be called on fields of other types as well. The value will be automatically converted for other field types, with a possible loss of precision.

This method is the same as the C function GDALRATSetValueAsDouble().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).
  dfValue | the value to assign.

Returns
  (since 3.12) CE_None in case of success, error code otherwise

Implements GDALRasterAttributeTable.

## ◆ SetValue() [6/6]

CPLErr GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow,
|  | int | iField,
|  | int | nValue
| ) |  |
| override virtual

Set field value from integer.

The indicated field (column) on the indicated row is set from the passed value. This method is nominally called on fields of type GFT_Integer, but it can be called on fields of other types as well. The value will be automatically converted for other field types, with a possible loss of precision.

This method is the same as the C function GDALRATSetValueAsInteger().

Parameters

  iRow | row to fetch (zero based).
  iField | column to fetch (zero based).
  nValue | the value to assign.

Returns
  (since 3.12) CE_None in case of success, error code otherwise

Implements GDALRasterAttributeTable.

## ◆ TranslateToColorTable()

GDALColorTable * GDALRasterAttributeTable::TranslateToColorTable | ( | int | nEntryCount = `-1` | ) |
| virtual inherited

Translate to a color table.

This method will attempt to create a corresponding GDALColorTable from this raster attribute table.

This method is the same as the C function GDALRATTranslateToColorTable().

Parameters

  nEntryCount | The number of entries to produce (0 to nEntryCount-1), or -1 to auto-determine the number of entries.

Returns
  the generated color table or NULL on failure.

## ◆ ValuesIO() [1/6]

CPLErr GDALRasterAttributeTable::ValuesIO | ( | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | bool * | pbData
| ) |  |
| virtual inherited

Read or Write a block of booleans to/from the Attribute Table.

This method is the same as the C function GDALRATValuesIOAsBoolean().

Parameters

  eRWFlag | either GF_Read or GF_Write
  iField | column of the Attribute Table
  iStartRow | start row to start reading/writing (zero based)
  iLength | number of rows to read or write
  pbData | pointer to array of booleans to read/write. Should be at least iLength long.

Returns
  CE_None or CE_Failure if iStartRow + iLength greater than number of rows in table.

Since
  3.12

## ◆ ValuesIO() [2/6]

CPLErr GDALRasterAttributeTable::ValuesIO | ( | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | char ** | papszStrList
| ) |  |
| virtual inherited

Read or Write a block of strings to/from the Attribute Table.

This method is the same as the C function GDALRATValuesIOAsString(). When reading, papszStrList must be already allocated to the correct size. The caller is expected to call CPLFree on each read string.

Parameters

  eRWFlag | either GF_Read or GF_Write
  iField | column of the Attribute Table
  iStartRow | start row to start reading/writing (zero based)
  iLength | number of rows to read or write
  papszStrList | pointer to array of strings to read/write. Should be at least iLength long.

Returns
  CE_None or CE_Failure if iStartRow + iLength greater than number of rows in table.

## ◆ ValuesIO() [3/6]

CPLErr GDALRasterAttributeTable::ValuesIO | ( | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | double * | pdfData
| ) |  |
| virtual inherited

Read or Write a block of doubles to/from the Attribute Table.

This method is the same as the C function GDALRATValuesIOAsDouble().

Parameters

  eRWFlag | either GF_Read or GF_Write
  iField | column of the Attribute Table
  iStartRow | start row to start reading/writing (zero based)
  iLength | number of rows to read or write
  pdfData | pointer to array of doubles to read/write. Should be at least iLength long.

Returns
  CE_None or CE_Failure if iStartRow + iLength greater than number of rows in table.

## ◆ ValuesIO() [4/6]

CPLErr GDALRasterAttributeTable::ValuesIO | ( | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | GByte ** | ppabyWKB,
|  | size_t * | pnWKBSize
| ) |  |
| virtual inherited

Read or Write a block of WKB-encoded geometries to/from the Attribute Table.

When reading, each ppabyWKB[] should be CPLFree'd() after use.

This method is the same as the C function GDALRATValuesIOAsWKBGeometry().

Parameters

  eRWFlag | either GF_Read or GF_Write
  iField | column of the Attribute Table
  iStartRow | start row to start reading/writing (zero based)
  iLength | number of rows to read or write
  ppabyWKB | pointer to array of pointer of WKB-encoded geometries to read/write. Should be at least iLength long.
  pnWKBSize | pointer to array of WKB size. Should be at least iLength long.

Returns
  CE_None or CE_Failure if iStartRow + iLength greater than number of rows in table.

Since
  3.12

## ◆ ValuesIO() [5/6]

CPLErr GDALRasterAttributeTable::ValuesIO | ( | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | GDALRATDateTime * | psDateTime
| ) |  |
| virtual inherited

Read or Write a block of DateTime to/from the Attribute Table.

This method is the same as the C function GDALRATValuesIOAsDateTime().

Parameters

  eRWFlag | either GF_Read or GF_Write
  iField | column of the Attribute Table
  iStartRow | start row to start reading/writing (zero based)
  iLength | number of rows to read or write
  psDateTime | pointer to array of DateTime to read/write. Should be at least iLength long.

Returns
  CE_None or CE_Failure if iStartRow + iLength greater than number of rows in table.

Since
  3.12

## ◆ ValuesIO() [6/6]

CPLErr GDALRasterAttributeTable::ValuesIO | ( | GDALRWFlag | eRWFlag,
|  | int | iField,
|  | int | iStartRow,
|  | int | iLength,
|  | int * | pnData
| ) |  |
| virtual inherited

Read or Write a block of integers to/from the Attribute Table.

This method is the same as the C function GDALRATValuesIOAsInteger().

Parameters

  eRWFlag | either GF_Read or GF_Write
  iField | column of the Attribute Table
  iStartRow | start row to start reading/writing (zero based)
  iLength | number of rows to read or write
  pnData | pointer to array of ints to read/write. Should be at least iLength long.

Returns
  CE_None or CE_Failure if iStartRow + iLength greater than number of rows in table.

## ◆ XMLInit()

CPLErr GDALRasterAttributeTable::XMLInit | ( | const CPLXMLNode * | psTree,
|  | const char * |
| ) |  |
| virtual inherited

Deserialize from XML.

Parameters

  psTree | XML tree

Returns
  error code.

The documentation for this class was generated from the following files:

- gdal_rat.h
- gdal_rat.cpp