| TerraLib 4.1

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

Functions
Generalized Proximity Matrix

## Functions

TL_DLL bool | createGPMMetadataTable (TeDatabase *db, const bool &integrity=true)
TL_DLL bool | createNeighbourhoodTable (TeDatabase *db, const string &tableName)
template<typename set >
bool | insertGPM (TeDatabase *db, TeGeneralizedProxMatrix< set > *gpm, vector< string > &objs)
template<typename set >
bool | loadDefaultGPM (TeDatabase *db, const int &themeId, TeGeneralizedProxMatrix< set > *&gpm)
TL_DLL bool | deleteGPMTable (TeDatabase *db, const int &themeId, const int &gpmId=-1)
| Delete the generalized proximity matrix of a theme - neighbourhoodTable and metadata.

## Detailed Description

Functions to persist a generalized proximity matrix

See also:
  TeGeneralizedProxMatrix

## Function Documentation

TL_DLL bool createGPMMetadataTable | ( | TeDatabase * | db,
|  | const bool & | integrity = `true`
| ) |  |

Creates a table to store information about the generalized proximity matrix

Parameters:

  db | pointer do a TerraLib database
  integrity | flag to indicate a integrity relation (with the theme) should be created

TL_DLL bool createNeighbourhoodTable | ( | TeDatabase * | db,
|  | const string & | tableName
| ) |  |

Creates a table to store information about the neighbourhood of a the objects selected in a theme

Parameters:

  db | pointer do a TerraLib database
  tableName | name of the table

TL_DLL bool deleteGPMTable | ( | TeDatabase * | db,
|  | const int & | themeId,
|  | const int & | gpmId = `-1`
| ) |  |

Delete the generalized proximity matrix of a theme - neighbourhoodTable and metadata.

Delete all generalized proximity matrix of a theme (neighbourhoodTable and metadata) or only the gpm with a specific id (gpmId)

Parameters:

  db | pointer do a TerraLib database
  themeId | identification of the theme
  gpmId | GPM identifier

template<typename set >

bool insertGPM | ( | TeDatabase * | db,
|  | TeGeneralizedProxMatrix< set > * | gpm,
|  | vector< string > & | objs
| ) |  |

Persists a generalized proximity matrix in a TerraLib database

Parameters:

  db | pointer do a TerraLib database
  gpm | a proximity matrix
  objs | vector with the identifier of the objects in the matrix

template<typename set >

bool loadDefaultGPM | ( | TeDatabase * | db,
|  | const int & | themeId,
|  | TeGeneralizedProxMatrix< set > *& | gpm
| ) |  |

Loads from the database the dafault GPM associated to a theme

Parameters:

  db | pointer do a TerraLib database
  themeId | identification of the theme
  gpm | a structure of a GPM in memory

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines