| TerraLib 4.1

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

- File List
- File Members

Functions
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeSTEFunctionsDB.h File Reference

This file contains a set of functions to build spatio-temporal sets from a TerraLib databse. More...

`#include "TeDatabase.h"`
`#include "TeProgress.h"`
`#include <vector>`
`#include <string>`

Go to the source code of this file.

## Functions

template<typename elementSet >
bool | TeSTOSetBuildDB (elementSet *stoset, bool loadGeometries=false, bool loadAllAttributes=false, vector< string > attrNames=vector< string >())
| Builds the spatial object set from database according to the restrictions previously defined.
template<typename elementSet >
bool | TeSTOSetBuildDB (elementSet *stoset, TeGroupingAttr &groupAttr, bool loadGeometries=false)
| Builds the spatial object set from database according to the restrictions previously defined.
template<typename elementSet >
bool | TeUpdateDBFromSet (elementSet *elemSet, const string &tableName, vector< int > *indexes=0)
| Updates or inserts a database table from a spatial object set.
template<typename Element >
bool | insertRow (Element *elem, TeTable &table, const string &uniqueValue, TeDatabase *db, vector< int > *indexes=0)
| Auxiliary function to insert a row.
template<typename Element >
bool | updateRow (Element *elem, TeTable table, const string &uniqueId, TeDatabase *db, vector< int > *indexes=0)
| Auxiliary function to update a row.

## Detailed Description

This file contains a set of functions to build spatio-temporal sets from a TerraLib databse.

## Function Documentation

template<typename Element >

bool insertRow | ( | Element * | elem,
|  | TeTable & | table,
|  | const string & | uniqueValue,
|  | TeDatabase * | db,
|  | vector< int > * | indexes = `0`
| ) |  |

Auxiliary function to insert a row.

template<typename elementSet >

bool TeSTOSetBuildDB | ( | elementSet * | stoset,
|  | bool | loadGeometries = `false`,
|  | bool | loadAllAttributes = `false`,
|  | vector< string > | attrNames = `vector<string>()`
| ) |  |

Builds the spatial object set from database according to the restrictions previously defined.

Parameters:

  stoset | the STOSet that will be filled
  loadGeometries | if the STOSet will be filled with the geometries
  loadAllAttributes | if the STOSet will be filled with all attributes of the tables of the STOSet
  attrNames | a subset of the attribute names that will be loaded, if the param loadAllAttributes is false

Examples:
  createProximityMatrix.cpp, createSTElementSetFromLayer.cpp, createSTElementSetFromTheme.cpp, and proxMatrixAndSpatialStatistics.cpp.

template<typename elementSet >

bool TeSTOSetBuildDB | ( | elementSet * | stoset,
|  | TeGroupingAttr & | groupAttr,
|  | bool | loadGeometries = `false`
| ) |  |

Builds the spatial object set from database according to the restrictions previously defined.

Parameters:

  stoset | the STOSet that will be filled
  groupAttr | a map from attribute name to statistic type
  loadGeometries | if the STOSet will be filled with the geometries

template<typename elementSet >

bool TeUpdateDBFromSet | ( | elementSet * | elemSet,
|  | const string & | tableName,
|  | vector< int > * | indexes = `0`
| ) |  |

Updates or inserts a database table from a spatial object set.

Parameters:

  elemSet | the set of spatial objects that will be inserted or updated into database
  tableName | database table name that will be updated
  indexes | the attribute indexes of the spatial objects that must be updated

verify if the table is in the stoset

Examples:
  proxMatrixAndSpatialStatistics.cpp.

template<typename Element >

bool updateRow | ( | Element * | elem,
|  | TeTable | table,
|  | const string & | uniqueId,
|  | TeDatabase * | db,
|  | vector< int > * | indexes = `0`
| ) |  |

Auxiliary function to update a row.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines