| TerraLib 4.1

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

Functions
BNA format
Geographical data formats

## Functions

TLFUNCTIONS_DLL TeLayer * | TeImportBNA (const string &bnaFileName, TeDatabase *db, const std::string &layerName="", const std::string &linkName="")
TLFUNCTIONS_DLL bool | TeImportBNA (TeLayer *layer, const string &bnaFileName, string attrTableName, TeAttributeList &attList, int unsigned chunkSize, std::string &linkName)
TLFUNCTIONS_DLL bool | TeReadBNAAttributeList (const string &bnaFileName, TeAttributeList &attList)

## Detailed Description

Functions related to BNA format (Atlas GIS BNA)

## Function Documentation

TLFUNCTIONS_DLL TeLayer* TeImportBNA | ( | const string & | bnaFileName,
|  | TeDatabase * | db,
|  | const std::string & | layerName = `""`,
|  | const std::string & | linkName = `""`
| ) |  |

Imports a geo data in BNA format to a TerraLib database

Parameters:

  bnaFileName | BNA file name
  db | pointer to a TerraLib database
  layerName | name of the layer that will contain the data (optional)

Returns:
  a pointer to created layer if the data was imported successfully and 0 otherwise

TLFUNCTIONS_DLL bool TeImportBNA | ( | TeLayer * | layer,
|  | const string & | bnaFileName,
|  | string | attrTableName,
|  | TeAttributeList & | attList,
|  | int unsigned | chunkSize,
|  | std::string & | linkName
| ) |  |

Imports a BNA file to a specific layer TerraLib

Parameters:

  layer | pointer to a layer
  bnaFileName | BNA file name
  attrTableName | the name that the attribute table will be saved
  attList | to return the list of attributes defined in the bna file, used only to name the fields
  chunkSize | the number of objects in memory before save them to the layer
  linkCol | name of the column that will contain the link to geometries

Returns:
  TRUE if the data was imported successfully and FALSE otherwise

TLFUNCTIONS_DLL bool TeReadBNAAttributeList | ( | const string & | bnaFileName,
|  | TeAttributeList & | attList
| ) |  |

Reads the attributes definition of a data in BNA format

Parameters:

  bnaFileName | BNA file name
  attList | to return the attribute list

Returns:
  TRUE if the attribute list is successfully read and FALSE otherwise

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines