| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

Functions
DBF tables
Geographical data formats

## Functions

SHP_DLL bool | TeReadDBFAttributeList (const string &dbfFileName, TeAttributeList &attList)
SHP_DLL bool | TeReadDBFAttributes (const string &dbfFileName, TeTable &table, int nrecords=-1, int rinitial=0, bool createAuto=false)
SHP_DLL bool | TeImportDBFTable (const string &dbfFileName, TeDatabase *db, TeLayer *layer=0, TeAttrTableType tableType=TeAttrExternal, string objectIdAtt="object_id_")
SHP_DLL void | TeDBFRowDecode (DBFHandle &dbfHandle, int nr, TeTableRow &row)
| Decodify a row of a DBF into a TeTableRow structure.

## Detailed Description

Functions related to DBF table format

## Function Documentation

SHP_DLL void TeDBFRowDecode | ( | DBFHandle & | dbfHandle,
|  | int | nr,
|  | TeTableRow & | row
| ) |  |

Decodify a row of a DBF into a TeTableRow structure.

Parameters:

  dbfHandle | pointer to a DBF handler
  nr | number of the row
  row | reference to a row that will store the data

SHP_DLL bool TeImportDBFTable | ( | const string & | dbfFileName,
|  | TeDatabase * | db,
|  | TeLayer * | layer = `0`,
|  | TeAttrTableType | tableType = `TeAttrExternal`,
|  | string | objectIdAtt = `"object_id_"`
| ) |  |

Imports a DBF table to a TerraLib database This function imports a DBF to a TerraLib database. An attribute table can be associated to a particular layer, or as an external table that will be linked to any layer when genereated a theme. A column called object_id_ will be added with unique values automatically generated.

Parameters:

  dbfFileName | DBF file name
  db | pointer to a TerraLib database
  layer | pointer to a layer to which the table will associated
  tableType | type of the attribute table

SHP_DLL bool TeReadDBFAttributeList | ( | const string & | dbfFileName,
|  | TeAttributeList & | attList
| ) |  |

Reads the list of attributes specified in DBF file

Parameters:

  dbfFileName | DBF input file name
  attList | returns the DBF list of attributes

Returns:
  TRUE if the list of attributes were was successfully read and FALSE otherwise

SHP_DLL bool TeReadDBFAttributes | ( | const string & | dbfFileName,
|  | TeTable & | table,
|  | int | nrecords = `-1`,
|  | int | rinitial = `0`,
|  | bool | createAuto = `false`
| ) |  |

Reads a set of records from a shapelib to a structure in memory

Parameters:

  dbfFileName | DBF file name
  table | to return the set of records in memory
  nrecords | number of records to be read
  rinitial | number of the initial record
  createAuto | flag used to indicate if an auto number columns should be added to each record

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines