| TerraLib 4.1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
TeFileTheme Class Reference

`#include <TeFileTheme.h>`

Inheritance diagram for TeFileTheme:

List of all members.

## Public Member Functions

| TeFileTheme (const std::string &name="", TeViewNode *parent=0, int view=0, int id=0)
| Default Constructor.
| TeFileTheme (const std::string &name, TeGeoDataDriver *dataDriver, TeDatabase *localDb, TeViewNode *parent=0, int view=0)
| Constructor from specific parameters.
| TeFileTheme (const TeFileTheme &other)
| Copy constructor.
TeFileTheme & | operator= (TeFileTheme &rhs)
| Operator =.
| ~TeFileTheme ()
| Destructor.
virtual TeViewNode * | clone ()
| Clones the object.
void | setRasterFile (const std::string &fileName)
| Set the raste file name.
TeRaster * | getRasterFile ()
| Get a pointer to a raste file.
void | setDataDriver (TeGeoDataDriver *dataDriver)
| Set the data driver that will handle this file.
TeGeoDataDriver * | getDataDriver ()
| Get the data driver that will handle this file.
TeSTElementSet * | getData ()
| Give access to theme data as stored internally.
void | setFileName (const std::string &fileName)
| Set the name of the file that contains the data.
std::string | getFileName ()
| Get the name of the file that contains the data.
void | setLocalDatabase (TeDatabase *db)
| Set the pointer to the database where the theme is stored.
TeDatabase * | getLocalDatabase ()
| Get the pointer to the database where the theme is stored.
bool | retrieveMetadataFromFile ()
| Load the basic information about the data set from the file.
bool | retrieveDataFromFile ()
| Load the objects from the file and fills the set of elements.
void | clearData ()
| Releases the internal data set.
TeProjection * | getThemeProjection ()
| Return a pointer to the projection of the geometries accessible by this theme.
void | setThemeProjection (TeProjection *proj)
| Set the projection of the geometries accessible by this theme.
unsigned int | getNumberOfObjects ()
| Get the number of objects acessible by this theme.
void | setNumberOfObjects (unsigned int)
| Set the number of objects acessible by this theme.
bool | loadMetadata (TeDatabase *)
| Load metadata information about this theme.
bool | saveMetadata (TeDatabase *)
| Save metadata information about this theme.
bool | eraseMetadata (TeDatabase *)
| Erase the theme metadata in the database.
bool | save ()
| This method is kept for compatibility reasons with the abstract theme it doesn't do anything.
bool | buildGrouping (const TeGrouping &g, TeSelectedObjects selectedObjects=TeAll, vector< double > *dValuesVec=0)
| Save the grouping parameters in memory when there is no chronon.
bool | buildGrouping (const TeGrouping &g, TeChronon chr, vector< map< string, string > > &mapObjValVec)
| Save the grouping parameters in memory when there is chronon.
bool | saveGrouping (TeSelectedObjects selectedObjects=TeAll)
| Build the grouping and associate each object to its group.
bool | deleteGrouping ()
| Delete grouping.
void | setLegendsForObjects ()
| Set the legend id for each object of the theme.
void | setOwnLegendsForObjects ()
| Set the own legend id for each object of the theme.
set< string > | getObjects (TeSelectedObjects selectedObjects=TeAll)
| Get the set of objects corresponding to the object selection criteria.
set< string > | getObjects (const vector< string > &itemVec)
| Get the set of objects corresponding to the list of items.
vector< string > | getItemVector (TeSelectedObjects selectedObjects)
| Get the set of items corresponding to the object selection criteria.
vector< string > | getItemVector (const set< string > &oidSet)
| Get the set of items corresponding to the set of objects.
Locate geometries
Returns the geometry(ies) of the theme given coordinate
bool | locatePolygon (TeCoord2D &pt, TePolygon &polygon, const double &tol)
bool | locatePolygonSet (TeCoord2D &pt, double tol, TePolygonSet &polygons)
bool | locateLine (TeCoord2D &pt, TeLine2D &line, const double &tol)
bool | locatePoint (TeCoord2D &pt, TePoint &point, const double &tol)
bool | locateCell (TeCoord2D &pt, TeCell &c, const double &tol)

## Static Public Member Functions

static bool | createFileThemeTable (TeDatabase *db)
| An static method to create a metadata table to store information about this type of theme.

## Protected Member Functions

virtual bool | beforeCopyThemeTo (TeAbstractTheme *absThemeCopy, TeDatabase *outputDatabase)
| Should be reimplemented to set all the parameters and pre-requisites necessaries to copy a theme to the given database. This method will be called before the theme is saved in the database.

## Protected Attributes

TeSTElementSet * | data_
std::string | fileName_
TeDatabase * | localDb_
unsigned int | numObjects_
TeProjection * | projection_
TeGeoDataDriver * | dataDriver_
TeRaster * | raster_

## Constructor & Destructor Documentation

TeFileTheme::TeFileTheme | ( | const std::string & | name = `""`,
|  | TeViewNode * | parent = `0`,
|  | int | view = `0`,
|  | int | id = `0`
| ) |  |

Default Constructor.

TeFileTheme::TeFileTheme | ( | const std::string & | name,
|  | TeGeoDataDriver * | dataDriver,
|  | TeDatabase * | localDb,
|  | TeViewNode * | parent = `0`,
|  | int | view = `0`
| ) |  |

Constructor from specific parameters.

TeFileTheme::TeFileTheme | ( | const TeFileTheme & | other | ) |

Copy constructor.

TeFileTheme::~TeFileTheme | ( |  | ) |

Destructor.

## Member Function Documentation

bool TeFileTheme::beforeCopyThemeTo | ( | TeAbstractTheme * | absThemeCopy,
|  | TeDatabase * | outputDatabase
| ) |  | `[protected, virtual]`

Should be reimplemented to set all the parameters and pre-requisites necessaries to copy a theme to the given database. This method will be called before the theme is saved in the database.

Reimplemented from TeAbstractTheme.

bool TeFileTheme::buildGrouping | ( | const TeGrouping & | g,
|  | TeSelectedObjects | selectedObjects = `TeAll`,
|  | vector< double > * | dValuesVec = `0`
| ) |  | `[virtual]`

Save the grouping parameters in memory when there is no chronon.

Implements TeAbstractTheme.

bool TeFileTheme::buildGrouping | ( | const TeGrouping & | g,
|  | TeChronon | chr,
|  | vector< map< string, string > > & | mapObjValVec
| ) |  | `[virtual]`

Save the grouping parameters in memory when there is chronon.

Implements TeAbstractTheme.

void TeFileTheme::clearData | ( |  | ) |

Releases the internal data set.

TeViewNode * TeFileTheme::clone | ( |  | ) | `[virtual]`

Clones the object.

Reimplemented from TeViewNode.

bool TeFileTheme::createFileThemeTable | ( | TeDatabase * | db | ) | `[static]`

An static method to create a metadata table to store information about this type of theme.

bool TeFileTheme::deleteGrouping | ( |  | ) | `[virtual]`

Delete grouping.

Implements TeAbstractTheme.

bool TeFileTheme::eraseMetadata | ( | TeDatabase * | localDb_ | ) | `[virtual]`

Erase the theme metadata in the database.

Implements TeAbstractTheme.

TeSTElementSet * TeFileTheme::getData | ( |  | ) |

Give access to theme data as stored internally.

TeGeoDataDriver * TeFileTheme::getDataDriver | ( |  | ) |

Get the data driver that will handle this file.

std::string TeFileTheme::getFileName | ( |  | ) |

Get the name of the file that contains the data.

std::vector< std::string > TeFileTheme::getItemVector | ( | TeSelectedObjects | selectedObjects | ) | `[virtual]`

Get the set of items corresponding to the object selection criteria.

Implements TeAbstractTheme.

std::vector< std::string > TeFileTheme::getItemVector | ( | const set< string > & | oidSet | ) | `[virtual]`

Get the set of items corresponding to the set of objects.

Implements TeAbstractTheme.

TeDatabase * TeFileTheme::getLocalDatabase | ( |  | ) |

Get the pointer to the database where the theme is stored.

unsigned int TeFileTheme::getNumberOfObjects | ( |  | ) | `[virtual]`

Get the number of objects acessible by this theme.

Implements TeAbstractTheme.

std::set< std::string > TeFileTheme::getObjects | ( | TeSelectedObjects | selectedObjects = `TeAll` | ) | `[virtual]`

Get the set of objects corresponding to the object selection criteria.

Implements TeAbstractTheme.

std::set< std::string > TeFileTheme::getObjects | ( | const vector< string > & | itemVec | ) | `[virtual]`

Get the set of objects corresponding to the list of items.

Implements TeAbstractTheme.

TeRaster * TeFileTheme::getRasterFile | ( |  | ) |

Get a pointer to a raste file.

TeProjection * TeFileTheme::getThemeProjection | ( |  | ) | `[virtual]`

Return a pointer to the projection of the geometries accessible by this theme.

Implements TeAbstractTheme.

bool TeFileTheme::loadMetadata | ( | TeDatabase * | localDb | ) | `[virtual]`

Load metadata information about this theme.

Implements TeAbstractTheme.

bool TeFileTheme::locateCell | ( | TeCoord2D & | pt,
|  | TeCell & | c,
|  | const double & | tol
| ) |  | `[virtual]`

Implements TeAbstractTheme.

bool TeFileTheme::locateLine | ( | TeCoord2D & | pt,
|  | TeLine2D & | line,
|  | const double & | tol
| ) |  | `[virtual]`

Implements TeAbstractTheme.

bool TeFileTheme::locatePoint | ( | TeCoord2D & | pt,
|  | TePoint & | point,
|  | const double & | tol
| ) |  | `[virtual]`

Implements TeAbstractTheme.

bool TeFileTheme::locatePolygon | ( | TeCoord2D & | pt,
|  | TePolygon & | polygon,
|  | const double & | tol
| ) |  | `[virtual]`

Implements TeAbstractTheme.

bool TeFileTheme::locatePolygonSet | ( | TeCoord2D & | pt,
|  | double | tol,
|  | TePolygonSet & | polygons
| ) |  | `[virtual]`

Implements TeAbstractTheme.

TeFileTheme & TeFileTheme::operator= | ( | TeFileTheme & | rhs | ) |

Operator =.

bool TeFileTheme::retrieveDataFromFile | ( |  | ) |

Load the objects from the file and fills the set of elements.

bool TeFileTheme::retrieveMetadataFromFile | ( |  | ) |

Load the basic information about the data set from the file.

bool TeFileTheme::save | ( |  | ) | `[virtual]`

This method is kept for compatibility reasons with the abstract theme it doesn't do anything.

Implements TeAbstractTheme.

bool TeFileTheme::saveGrouping | ( | TeSelectedObjects | selectedObjects = `TeAll` | ) | `[virtual]`

Build the grouping and associate each object to its group.

Implements TeAbstractTheme.

bool TeFileTheme::saveMetadata | ( | TeDatabase * | localDb_ | ) | `[virtual]`

Save metadata information about this theme.

Implements TeAbstractTheme.

void TeFileTheme::setDataDriver | ( | TeGeoDataDriver * | dataDriver | ) |

Set the data driver that will handle this file.

void TeFileTheme::setFileName | ( | const std::string & | fileName | ) |

Set the name of the file that contains the data.

void TeFileTheme::setLegendsForObjects | ( |  | ) | `[virtual]`

Set the legend id for each object of the theme.

Implements TeAbstractTheme.

void TeFileTheme::setLocalDatabase | ( | TeDatabase * | db | ) |

Set the pointer to the database where the theme is stored.

void TeFileTheme::setNumberOfObjects | ( | unsigned int | n | ) |

Set the number of objects acessible by this theme.

void TeFileTheme::setOwnLegendsForObjects | ( |  | ) | `[virtual]`

Set the own legend id for each object of the theme.

Implements TeAbstractTheme.

void TeFileTheme::setRasterFile | ( | const std::string & | fileName | ) |

Set the raste file name.

void TeFileTheme::setThemeProjection | ( | TeProjection * | proj | ) |

Set the projection of the geometries accessible by this theme.

## Member Data Documentation

TeSTElementSet* TeFileTheme::data_`[protected]`

TeGeoDataDriver* TeFileTheme::dataDriver_`[protected]`

std::string TeFileTheme::fileName_`[protected]`

TeDatabase* TeFileTheme::localDb_`[protected]`

unsigned int TeFileTheme::numObjects_`[protected]`

TeProjection* TeFileTheme::projection_`[protected]`

TeRaster* TeFileTheme::raster_`[protected]`

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeFileTheme.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeFileTheme.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines