Raster Attribute Table container. More...
#include <gdal_rat.h>
Public Member Functions | |
GDALDefaultRasterAttributeTable () | |
Construct empty table. | |
GDALDefaultRasterAttributeTable (const GDALDefaultRasterAttributeTable &) | |
Copy constructor. | |
GDALDefaultRasterAttributeTable * | Clone () const |
Copy Raster Attribute Table. | |
virtual int | GetColumnCount () const |
Fetch table column count. | |
virtual const char * | GetNameOfCol (int) const |
Fetch name of indicated column. | |
virtual GDALRATFieldUsage | GetUsageOfCol (int) const |
Fetch column usage value. | |
virtual GDALRATFieldType | GetTypeOfCol (int) const |
Fetch column type. | |
virtual int | GetColOfUsage (GDALRATFieldUsage) const |
Fetch column index for given usage. | |
virtual int | GetRowCount () const |
Fetch row count. | |
virtual const char * | GetValueAsString (int iRow, int iField) const |
Fetch field value as a string. | |
virtual int | GetValueAsInt (int iRow, int iField) const |
Fetch field value as a integer. | |
virtual double | GetValueAsDouble (int iRow, int iField) const |
Fetch field value as a double. | |
virtual void | SetValue (int iRow, int iField, const char *pszValue) |
Set field value from string. | |
virtual void | SetValue (int iRow, int iField, double dfValue) |
Set field value from double. | |
virtual void | SetValue (int iRow, int iField, int nValue) |
Set field value from integer. | |
virtual int | ChangesAreWrittenToFile () |
Determine whether changes made to this RAT are reflected directly in the dataset. | |
virtual void | SetRowCount (int iCount) |
virtual int | GetRowOfValue (double dfValue) const |
virtual int | GetRowOfValue (int nValue) const |
virtual CPLErr | CreateColumn (const char *pszFieldName, GDALRATFieldType eFieldType, GDALRATFieldUsage eFieldUsage) |
virtual CPLErr | SetLinearBinning (double dfRow0Min, double dfBinSize) |
virtual int | GetLinearBinning (double *pdfRow0Min, double *pdfBinSize) const |
Raster Attribute Table container.
int GDALDefaultRasterAttributeTable::ChangesAreWrittenToFile | ( | ) | [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.
GDALDefaultRasterAttributeTable * GDALDefaultRasterAttributeTable::Clone | ( | ) | const [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 NULL) 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().
Implements GDALRasterAttributeTable.
int GDALDefaultRasterAttributeTable::GetColOfUsage | ( | GDALRATFieldUsage | ) | const [virtual] |
Fetch column index for given usage.
Returns the index of the first column of the requested usage type, or -1 if no match is found.
This method is the same as the C function GDALRATGetUsageOfCol().
eUsage | usage type to search for. |
Implements GDALRasterAttributeTable.
int GDALDefaultRasterAttributeTable::GetColumnCount | ( | ) | const [virtual] |
Fetch table column count.
This method is the same as the C function GDALRATGetColumnCount().
Implements GDALRasterAttributeTable.
const char * GDALDefaultRasterAttributeTable::GetNameOfCol | ( | int | ) | const [virtual] |
Fetch name of indicated column.
This method is the same as the C function GDALRATGetNameOfCol().
iCol | the column index (zero based). |
Implements GDALRasterAttributeTable.
int GDALDefaultRasterAttributeTable::GetRowCount | ( | ) | const [virtual] |
Fetch row count.
This method is the same as the C function GDALRATGetRowCount().
Implements GDALRasterAttributeTable.
GDALRATFieldType GDALDefaultRasterAttributeTable::GetTypeOfCol | ( | int | ) | const [virtual] |
Fetch column type.
This method is the same as the C function GDALRATGetTypeOfCol().
iCol | the column index (zero based). |
Implements GDALRasterAttributeTable.
GDALRATFieldUsage GDALDefaultRasterAttributeTable::GetUsageOfCol | ( | int | ) | const [virtual] |
Fetch column usage value.
This method is the same as the C function GDALRATGetUsageOfCol().
iCol | the column index (zero based). |
Implements GDALRasterAttributeTable.
double GDALDefaultRasterAttributeTable::GetValueAsDouble | ( | int | iRow, | |
int | iField | |||
) | const [virtual] |
Fetch field value as a double.
The value of the requested column in the requested row is returned as a double. Non double fields will be converted to double with the possibility of data loss.
This method is the same as the C function GDALRATGetValueAsDouble().
iRow | row to fetch (zero based). | |
iField | column to fetch (zero based). |
Implements GDALRasterAttributeTable.
int GDALDefaultRasterAttributeTable::GetValueAsInt | ( | int | iRow, | |
int | iField | |||
) | const [virtual] |
Fetch field value as a integer.
The value of the requested column in the requested row is returned as an integer. Non-integer fields will be converted to integer with the possibility of data loss.
This method is the same as the C function GDALRATGetValueAsInt().
iRow | row to fetch (zero based). | |
iField | column to fetch (zero based). |
Implements GDALRasterAttributeTable.
const char * GDALDefaultRasterAttributeTable::GetValueAsString | ( | int | iRow, | |
int | iField | |||
) | const [virtual] |
Fetch field value as a string.
The value of the requested column in the requested row is returned as a string. 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().
iRow | row to fetch (zero based). | |
iField | column to fetch (zero based). |
Implements GDALRasterAttributeTable.
void GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow, | |
int | iField, | |||
double | dfValue | |||
) | [virtual] |
Set field value from double.
The indicated field (column) on the indicated row is set from the passed value. 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().
iRow | row to fetch (zero based). | |
iField | column to fetch (zero based). | |
dfValue | the value to assign. |
Implements GDALRasterAttributeTable.
void GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow, | |
int | iField, | |||
int | nValue | |||
) | [virtual] |
Set field value from integer.
The indicated field (column) on the indicated row is set from the passed value. 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().
iRow | row to fetch (zero based). | |
iField | column to fetch (zero based). | |
nValue | the value to assign. |
Implements GDALRasterAttributeTable.
void GDALDefaultRasterAttributeTable::SetValue | ( | int | iRow, | |
int | iField, | |||
const char * | pszValue | |||
) | [virtual] |
Set field value from string.
The indicated field (column) on the indicated row is set from the passed value. 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 GDALRATSetValueAsString().
iRow | row to fetch (zero based). | |
iField | column to fetch (zero based). | |
pszValue | the value to assign. |
Implements GDALRasterAttributeTable.