| TerraLib 4.1

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

Functions
MID/MIF format
Geographical data formats

## Functions

TLFUNCTIONS_DLL TeLayer * | TeImportMIF (const string &mifFileName, TeDatabase *db, const string &layerName="")
TLFUNCTIONS_DLL bool | TeImportMIF (TeLayer *layer, const string &mifFileName, string attrTableName="", string objectIdAttr="", int unsigned chunkSize=60)
TLFUNCTIONS_DLL void | TeReadMIFAttributeList (const string &mifFileName, TeAttributeList &attList)
TLFUNCTIONS_DLL TeProjection * | TeReadMIFProjection (const string &mifFileName)
TLFUNCTIONS_DLL bool | TeExportQuerierToMIF (TeQuerier *querier, const std::string &base, TeProjection *proj)
TLFUNCTIONS_DLL bool | TeExportLayerToMIF (TeLayer *layer, const string &baseName="")
TLFUNCTIONS_DLL bool | TeExportThemeToMIF (TeTheme *theme, TeSelectedObjects selOb=TeAll, const string &baseName="")
TLFUNCTIONS_DLL bool | TeExportMIF (TeLayer *layer, const string &mifFileName, const string &tableName, const string &restriction="")

## Detailed Description

Functions related to MID MIF format

## Function Documentation

TLFUNCTIONS_DLL bool TeExportLayerToMIF | ( | TeLayer * | layer,
|  | const string & | baseName = `""`
| ) |  |

Exports a layer in a TerraLib database to a file in MID/MIF format

Parameters:

  layer | pointer to the layer
  baseName | name of the output MID/MIF file

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

TLFUNCTIONS_DLL bool TeExportMIF | ( | TeLayer * | layer,
|  | const string & | mifFileName,
|  | const string & | tableName,
|  | const string & | restriction = `""`
| ) |  |

Exports a layer in a TerraLib database to a file in MID/MIF format

Parameters:

  layer | pointer to the layer
  mifFileName | name of the output MID/MIF file
  tableName | name of the attribute table to be exported

Returns:
  true if the data was successfully exported and FALSE otherwise

TLFUNCTIONS_DLL bool TeExportQuerierToMIF | ( | TeQuerier * | querier,
|  | const std::string & | base,
|  | TeProjection * | proj
| ) |  |

Exports a querier to a MID/MIF file

Parameters:

  querier | pointer to a valid querier
  baseName | name of the output MID/MIF file
  proj | pointer to the projection of the geometries retrieved by the querier

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

TLFUNCTIONS_DLL bool TeExportThemeToMIF | ( | TeTheme * | theme,
|  | TeSelectedObjects | selOb = `TeAll`,
|  | const string & | baseName = `""`
| ) |  |

Exports a theme in a TerraLib database to a file in MID/MIF format

Parameters:

  theme | pointer to the theme
  baseName | name of the output MID/MIF file
  selOb | selection of the objects that should be exported

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

TLFUNCTIONS_DLL bool TeImportMIF | ( | TeLayer * | layer,
|  | const string & | mifFileName,
|  | string | attrTableName = `""`,
|  | string | objectIdAttr = `""`,
|  | int unsigned | chunkSize = `60`
| ) |  |

Imports a MID/MIF file to a specific layer TerraLib

Parameters:

  layer | pointer to a layer
  mifFileName | MIF file name
  attrTableName | the name that the attribute table will be saved
  objectIdAttr | name of the attribute that has the identification of objects
  chunkSize | the number of objects in memory before save them in the layer

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

TLFUNCTIONS_DLL TeLayer* TeImportMIF | ( | const string & | mifFileName,
|  | TeDatabase * | db,
|  | const string & | layerName = `""`
| ) |  |

Imports a geo data in MID/MIF format to a TerraLib database

Parameters:

  mifFileName | MIF 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

Examples:
  importMIDMIF.cpp.

TLFUNCTIONS_DLL void TeReadMIFAttributeList | ( | const string & | mifFileName,
|  | TeAttributeList & | attList
| ) |  |

Reads the attributes definition of a data in MID/MIF format

Parameters:

  mifFileName | MIF file name
  attList | to return the list of attributes defined in the file

TLFUNCTIONS_DLL TeProjection* TeReadMIFProjection | ( | const string & | mifFileName | ) |

Reads the geographical projection of a data in MID/MIF format

Parameters:

  mifFileName | MIF file name

Returns:
  a pointer to a TeProjection

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines