| TerraLib 4.1

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

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

Public Member Functions | Protected Member Functions | Protected Attributes
TeDatabase Class Reference

An abstract database class. More...

`#include <TeDatabase.h>`

Inheritance diagram for TeDatabase:

List of all members.

## Public Member Functions

| TeDatabase ()
| Empty constructor.
virtual | ~TeDatabase ()
| Destructor.
virtual TeDatabase & | operator= (const TeDatabase &other)
| Assignment operator.
virtual bool | operator== (const TeDatabase &other) const
| Operator ==.
virtual bool | removeGeometry (const string &tableName, const TeGeomRep &rep, const int &geomId)
| Removes a geometry from the given tableName.
virtual bool | insertRasterBlock (const string &table, const string &blockId, const TeCoord2D &ll, const TeCoord2D &ur, unsigned char *buf, unsigned long size, int band=0, unsigned int res=1, unsigned int subband=0)=0
| Insert a raster block into the database.
virtual bool | insertVisual (TeLegendEntry *legend)
| Inserts the entire visual of a Legend.
virtual bool | insertRasterVisual (int themeId, TeRasterVisual *rasterVisual)
| Insert raster visual.
virtual TeRaster * | loadLayerRaster (int layerId, const string &objectId="", const char &mode= 'r')
| Returns the raster associated to a layer.
virtual bool | createLUTTable (const string &name)
| Creates a lookup table (used for pallete raster representations)
virtual bool | loadRasterLUT (TeRasterParams *par)
| Loads a look up table associated to a raster and fills its parameters.
virtual bool | createSpatialIndex (const string &table, const string &columns, TeSpatialIndexType=TeRTREE, short=0, short=0)
| Creates a spatial index for a spatial table. In order to get correct column names to index, see getSpatialIdxColumn method.
virtual bool | insertMetadata (const string &, const string &, double, double, TeBox &, short=0)
| Creates a spatial metadata for a spatial table. It is implemented only in spatial databases.
virtual string | getSpatialIdxColumn (TeGeomRep rep)
| Returns the name of the column that wiil be the spatially indexed, for a given type of geometry table.
virtual bool | updateBBox (const string &tableName, const string &keyColumnName, int keyValue, const TeBox &box)
| Update box information in a table that has a set of columns to store a box value.
virtual bool | nearestNeighbors (const string &actGeomTable, const string &actCollTable, TeGeomRep actRep, const string &objId1, TeKeys &actIdsOut, int numRes=1)
| Returns the nearest neighbors of a specific geometry of a geometric table (actGeomTable)
virtual bool | nearestNeighbors (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, const string &visCollTable, TeGeomRep visRep, TeKeys &visIdsOut, int numRes=1)
| Returns the nearest neighbors of a geometric table (visGeomTable) of a specific geometry of other geometric table (actGeomTable)
virtual bool | nearestNeighbors (const string &actGeomTable, const string &actCollTable, TeGeomRep actRep, const string &objId1, TeDatabasePortal *portal, int numRes=1)
| Returns the nearest neighbors of a specific geometry of a geometric table (actGeomTable)
virtual bool | nearestNeighbors (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, const string &visCollTable, TeGeomRep visRep, TeDatabasePortal *portal, int numRes=1)
| Returns the nearest neighbors of a geometric table (visGeomTable) of a specific geometry of other geometric table (actGeomTable)
virtual bool | getMBRGeom (string tableGeom, string object_id, TeBox &box, string colGeom)
| Return the box of a specific geometry (object_id)
virtual bool | getMBRSelectedObjects (string geomTable, string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType, TeBox &bout, const double &tol=0.0)
| Return the box of a select objects set.
virtual bool | getAttributeList (const string &tableName, TeAttributeList &attList)
| Gets the list of attributes of a table.
virtual string | escapeSequence (const string &from)=0
| Escape special characters in a string to be used in a SQL statement.
virtual TeBox | getThemeBox (TeTheme *theme)
| Returns theme box.
map< int, map< string, string > > & | mapThemeAlias ()
| Returns the container of legend title alias.
virtual string | concatValues (vector< string > &values, const string &unionString)=0
| Concat values in a vector using unionString as the join between each value.
virtual string | toUpper (const string &value)=0
| Returns the SQL function for upper case.
virtual string | leftString (const string &, const int &)
| Returns the SQL function for substring that starts from left to right with informed length.
virtual bool | updateVersionStamp (const string &version)
| Write the given version as the terralib version in the database.
virtual bool | loadVersionStamp (string &version)
| Read and returns the terralib version from the database.
virtual bool | dropDBView (const string &dbViewName)
| Drops a database view.
virtual std::string | getClientEncoding ()
| Gets the client encoding.
virtual bool | setClientEncoding (const std::string &)
| Sets the client encoding.
virtual bool | getEncodingList (std::vector< std::string > &)
| Retrives the list of available character sets.
virtual bool | getEncodingList (const std::string &, const std::string &, const std::string &, const int &, std::vector< std::string > &)
| Retrives the list of available character sets.
Connection
Methods related with connections.
virtual void | setConnection (TeConnection *c)
| Sets a connection that will be used by database.
virtual TeConnection * | getConnection ()
| Gets the connection used by database.
Members
Methods to access class private members
virtual string | errorMessage ()
| Returns the error message from the server.
virtual int | errorNum ()
| Returns the error number from the server.
string | user ()
| Return the user name of the connection opened.
void | user (string value)
| Set the current user name to view.
string | host ()
| Returns the host name of the connection opened.
string | password ()
| Returns the user's password of the connection opened.
string | databaseName ()
| Returns the database name of the connection opened.
string | dbmsName ()
| Returns the Database Management System name.
int | portNumber ()
| Returns the port number of the connection opened.
TeLayerMap & | layerMap ()
| Returns the map of layers in the database.
TeViewMap & | viewMap ()
| Returns the map of views in the database.
TeThemeMap & | themeMap ()
| Returns the map of themes in the database.
TeThemeMap & | invalidThemeMap ()
| Returns the map of invalid themes in the database.
TeProjectMap & | projectMap ()
| Returns the map of projects in the database.
TeLegendEntryMap & | legendMap ()
| Returns the map of legends in the database.
multiset< int > & | relationMSet ()
| Returns the set of relations between tables.
virtual void | clear ()
| Clears structures in memory (legendMap, layerMap, viewMap...) used to optimize database access.
Tables
Methods related to table manipulation.

Note:
  refer to data model documentation in order to understand the meanning of each tables and its fields

virtual bool | listTables (vector< string > &)
| Returns a list of tables in a database.
virtual bool | listDatabases (std::vector< std::string > &)
| Returns a lista of databases.
virtual bool | dropDatabase (const std::string &)
| Drop a database.
virtual bool | tableExist (const string &table)=0
| Verifies if a table exist in the database.
virtual bool | columnExist (const string &table, const string &column, TeAttribute &attr)=0
| Verifies if a table has a column.
virtual bool | allowEmptyString (const string &, const string &)
| Update a column.
virtual bool | validTable (TeTable &table)
| Verifies and modifies the column names of the table. It returns if the table was modified.
string | getTableName (int tableId)
| Return the name of an attribute table given its identifier.
string | getNewTableName (const string &n)
| Return a valid name for a table from a initial one.
virtual string | getConcatFieldsExpression (const vector< string > &fNamesVec)
| Concatenate field values.
virtual bool | createTable (const string &table, TeAttributeList &attr)=0
| Creates a table.
virtual bool | deleteTable (const string &table)
| Deletes a table. Do not allow the deletion of model tables.
virtual bool | addColumn (const string &table, TeAttributeRep &rep)=0
| Adds a column to a table.
virtual bool | deleteColumn (const string &table, const string &colName)
| Deletes a column to a table.
virtual bool | createRelation (const string &relName, const string &table, const string &fieldName, const string &relatedTable, const string &relatedField, bool cascadeDeletion)=0
| Creates a reationship between two tables.
virtual TeDBRelationType | existRelation (const string &tableName, const string &relName)=0
| Checks if a relation exist.
virtual bool | deleteRelation (const string &name, const string &table)
| Removes a relation exist.
Query
Methods related to query the database
virtual bool | execute (const string &sql)=0
| Executes a SQL command that doesnt return a record set. Tipically a data definition comand.
virtual TeDatabasePortal * | getPortal ()=0
| Returns a database portal.
virtual bool | inClauseValues (const string &query, const string &attribute, vector< string > &inClauseVector)
| Get the values that satisfy the query.
Data Model
Methods that create the database model suggested in TerraLib. Classes in TerraLib materialize the DataModel suggested.
virtual bool | createConceptualModel (bool withIntegrity=true, bool newDatabase=true, bool createIndex=true)
| Creates the entire TerraLib conceptual model.
virtual bool | defineIntegrity (void)
| Creates the referencial integrity of the conceptual model.
virtual bool | createIndex (const string &tableName, const string &indexName, const string &columnsName)
| Create the indexes for the tables in the conceptual model.
virtual bool | deleteIndex (const string &tableName, const string &indexName)
| Delete the index from tables in the conceptual model.
virtual bool | getIndexesFromTable (const string &tableName, std::vector< TeDatabaseIndex > &vecIndexes)
| Return a TeDatabaseIndex vector from a table.
virtual bool | createDatabaseTable ()
| Creates a table to store version database information.
virtual bool | createDatumTable ()
| Creates a table to store datum information.
virtual bool | createProjectionTable ()
| Creates a table to store projectinon information.
virtual bool | createSRSTable ()
| Creates a table to relate the TerraLib projection with a SRS id.
virtual bool | createLayerTable ()
| Creates a table to store Layers information.
virtual bool | createRepresentationTable ()
| Creates a table to store Representations information.
virtual bool | createViewTable ()
| Creates a table to store Views information.
virtual bool | createThemeTable ()
| Creates a table to store Themes information.
virtual bool | createGroupingTable ()
| Creates a table to store the groupings associated with a theme.
virtual bool | createThemeTablesTable ()
| Creates a table to store information about the attribute tables used by a theme.
virtual bool | createLegendTable ()
| Creates a table to store legends.
virtual bool | createVisualTable ()
| Creates a table to store visual definitions.
virtual bool | createVisualRasterTable ()
| Creates a table to store raster visual definitions.
virtual bool | createLayerTableTable ()
| Creates a table to store information about the non-spatial tables associated to this layer.
virtual bool | createTablesRelationTable ()
| Creates a table to store information about the external tables related to non-spatial tables of layers.
virtual bool | createProjectTable ()
| Creates a table to store information about projects: an structure that groups views.
virtual bool | createProjectViewTable ()
| Creates a table to store the relation between project/views information.
Project
Methods related to the manipulation of projects
virtual bool | loadProjectSet ()
| Load information about all projects stored in the database.
virtual bool | loadProject (TeProject *project)
| Load information about a particular project.
virtual bool | insertProject (TeProject *project)=0
| Insert information about a project.
virtual bool | updateProject (TeProject *project)
| Update information about a project.
virtual bool | deleteProject (int projectId)
| Delete a project from the database.
virtual bool | insertProjectViewRel (int projectId, int viewId)
| Insert a project/view relation.
virtual bool | deleteProjectViewRel (int projectId, int viewId)
| Deletes a project/view relation.
virtual bool | projectExist (const string &projectName)
| Check whether a given project already exists in the database (it is not case sensitive).
Geometries
Methods that create tables that store the spatial data
virtual bool | createPolygonGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for a polygon geometries.
virtual bool | createLineGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for line geometries.
virtual bool | createPointGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for point geometries.
virtual bool | createCellGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for cell geometries.
virtual bool | createTextGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for a text geometries.
virtual bool | createArcGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for a arc geometries.
virtual bool | createNodeGeometry (const string &tableName, const int &epsgCode=-1)
| Creates a table for a node geometries.
virtual bool | createRasterGeometry (const string &tableName)
| Creates a table to store raster representations of objects.
virtual bool | createRasterMetadataTable (const string &tableName)
| Creates a table to store information about raster representation.
virtual bool | createRasterTable (const string &tableName)
| Creates a table for raster geometries.
virtual bool | createCollectionTable (const string &tableName)
| Creates a table to store information about objects in a theme.
Non-spatial tables
Retrieving/Inserting/Modifying generic tables in the database.
virtual bool | getAttrTables (TeAttrTableVector &atts, TeAttrTableType attType=TeAllAttrTypes)
| Retrieves information about some tables.
virtual bool | insertRelationInfo (const int tableId, const string &tField, const string &rTable, const string &rField, int &relId)=0
| Inserts information about a link to an external table.
virtual bool | insertTableInfo (int layerId, TeTable &table, const string &user="")=0
| Inserts information about an attribute table.
virtual bool | updateTableInfo (int layerId, TeTable &table, const string user="")
| Updates information about an attribute table.
virtual bool | loadTableInfo (TeTable &table)
| Retrieves the metainformation about an attribute table.
virtual bool | insertTable (TeTable &table)
| Saves a table and its contents in the database.
virtual bool | alterTable (const string &tableName, TeAttributeRep &rep, const string &oldColName="")
| Alter a property of a table.
virtual bool | alterTable (const string &oldTableName, const string &newTablename)
| Alter the table name.
virtual bool | insertBlob (const string &tableName, const string &columnBlob, TeAttributeRep &columnId, const string &valueId, unsigned char *data, int size)
| Saves a large binary objects (BLOB) in a row table.
virtual bool | insertBlob (const string &tableName, const string &columnBlob, TeAttributeRep &columnId, const string &valueId, const string &fileName)
| Saves a large binary objects (BLOB) in a row table.
virtual bool | insertBlob (const string &tableName, const string &columnBlob, const string &whereClause, unsigned char *data, int size)=0
| Saves a large binary objects (BLOB) in a row table.
virtual bool | insertBlob (const string &tableName, const string &columnBlob, const string &whereClause, const string &fileName)
| Saves a large binary objects (BLOB) in a row table.
virtual bool | updateTable (TeTable &table)
| Updates a table and its contents in the database.
virtual bool | loadTable (const string &tableName, TeTable &table)
| Retrieves a table and its contents from the database.
virtual bool | selectTable (const string &tableName, const string &criteria, TeTable &table)
| Retrieves a table (or part of it) accordingly to a criteria written in SQL.
virtual bool | deleteLayerTable (int layerId, TeAttrTableType ttype=TeAttrStatic)
| Deletes all tables, of a particular type, associated to a layer.
Datum
Accessing/Inserting/Modifying datum information into the database.
virtual bool | insertDatum (const TeDatum &datum)
| Insert information about a datum.
virtual bool | updateDatum (const TeDatum &datum)
| Updates information about a datum.
virtual bool | loadDatum (TeDatum &datum)
| Retrieves information about a datum projection identified by its name.
virtual void | populateDatumTable ()
| Populates the datum table with a set of pre-defined datums.
virtual bool | loadDatumSet ()
| Loads the set of datum defined on database.
Projection
Accessing/Inserting/Modifying projection information into the database.
virtual bool | insertProjection (TeProjection *proj)=0
| Insert information about a geographical projection.
virtual bool | insertSRSId (TeProjection *proj, int srsId)
| Insert relation between TerraLib projection and a SRS id.
virtual bool | updateProjection (TeProjection *proj)
| Updates information about a geographical projection.
virtual bool | updateSRSId (TeProjection *proj, int srsId)
| Updates information about a geographical projection SRS id.
virtual TeProjection * | loadProjection (int id)
| Retrieves information about a geographical projection identified by its database id.
virtual TeProjection * | loadProjectionFromSRSId (int srsid)
| Retrieves information about a geographical projection identified by its srs id.
virtual bool | deleteProjection (const unsigned int &projId)
| Removes a projection from the database.
Layers
Retrieving/Inserting/Modifying/Deleting layers in the database.
virtual bool | insertLayer (TeLayer *layer)=0
| Insert information about a layer.
virtual bool | updateLayer (TeLayer *layer)
| Update information about a layer.
virtual bool | loadLayerSet (const bool &loadAttrList=true)
| Load information about all layers stored in the database.
virtual bool | loadLayer (TeLayer *layer, const bool &loadAttrList=true)
| Load information about a particular layer.
virtual bool | loadLayerTable (TeLayer *layer, const bool &loadAttrList=true)
| Load layer tables.
virtual bool | deleteLayer (int layerId)
| Delete a particular layer passing its id.
virtual bool | layerExist (int id)
| Check if a particular layer exists (passing its id)
virtual bool | layerExist (string layerName)
| Check if a particular layer exists (passing its name)
virtual string | getNewLayerName (const string &n)
| Checks whether a given layer name is valid or already exists in the database.
Representation
Retrieving/Inserting/Modifying/Deleting representations in the database.
virtual bool | insertRepresentation (int layerId, TeRepresentation &rep)=0
| Inserts information about a geometrical representation.
virtual bool | updateRepresentation (int layerId, TeRepresentation &rep)
| Updates information about a geometrical representation.
virtual bool | updateLayerBox (TeLayer *layer)
| Updates the box information of a layer in the corresponding metadata table.
Raster Tables
Retrieving/Inserting/Modifying/Deleting raster representations in the database.
virtual bool | insertRasterGeometry (const string &tableName, TeRasterParams &par, const string &objectId="")
| Inserts information about a raster geometry associated to an object.
virtual bool | updateRasterRepresentation (int layerId, TeRasterParams &par, const string &objectId="")
| Updates the information about the raster geometry associated to an object of a layer.
virtual string | getRasterTable (int layerId, const string &objectId)
| Returns the name of the table where the raster geometry associated to an object of a leyr.
virtual bool | insertRasterMetadata (const string &tableName, int geomId, TeRasterParams &par)
| Inserts metadata information about a particular raster geometry.
virtual bool | updateRasterMetadata (const string &tableName, int geomId, TeRasterParams &par)
| Updates metadata information about a particular raster geometry.
Views
Retrieving/Inserting/Modifying/Deleting views in the database.
virtual bool | insertView (TeView *view)=0
| Inserts a view.
virtual bool | updateView (TeView *view)
| Updates a view.
virtual bool | loadViewSet (const string &user, const bool &loadAttrList=true, const string &visualClass="tevisual")
| Loads a set of views belonging to a user.
virtual bool | loadView (TeView *view, const bool &loadAttrList=true, const string &visualClass="tevisual")
| Load a view.
virtual bool | deleteView (int viewId)
| Delete a view.
virtual bool | insertViewTree (TeViewTree *tree)=0
| Recursive inserting of a view tree.
virtual TeViewTree * | loadViewTree (TeView *view, int id, const bool &loadAttrList=true, const string &visualClass="tevisual")
| Recursive load view tree.
virtual bool | updateViewTree (TeViewTree *tree)
| Recusive updating of a view tree.
virtual bool | viewExist (string viewName)
| Check whether a given view already exists in the database.
Themes
Retrieving/Inserting/Modifying/Deleting themes and group of themes in the database.
virtual bool | insertThemeGroup (TeViewTree *tree)=0
| Inserts a group of themes in the database.
virtual bool | insertTheme (TeAbstractTheme *theme)=0
| Inserts an abstract theme in the database.
virtual bool | updateTheme (TeAbstractTheme *theme)
| Updates an asbtract theme in the database.
virtual bool | loadTheme (TeAbstractTheme *theme, const bool &loadAttrList=true, const string &visualClass="tevisual")
| Loads a theme from the database.
virtual bool | loadThemes (std::vector< TeAbstractTheme * > &vecThemes, const bool &loadAttrList, const std::string &userName, const bool &loadMetadata=true, const string &visualType="tevisual")
| Loads several themes from the database. Created for otimization.
virtual bool | loadExternalThemes (std::vector< TeAbstractTheme * > &vecExternalThemes)
| Loads several external themes from the database. Created for otimization.
virtual bool | loadThemeTable (TeTheme *theme, const bool &loadAttrList=true)
| Loads all attribute tables of a theme.
virtual bool | deleteThemeGroup (int themeId)
| Erases the theme group identified by themeId.
virtual bool | deleteTheme (int themeId)
| Erases the theme identified by themeId.
virtual bool | deleteLegend (int themeId)
| Erases the legends of a theme identified by themeId.
bool | insertThemeTable (TeTheme *theme, TeTable &inputTable)
| Inserts information about a table used by a theme.
virtual bool | insertThemeTable (int themeId, int tableId, int relationId, int tableOrder)=0
| Inserts information about a table used by a theme.
virtual bool | updateThemeTable (TeTheme *theme)
| Updates information about the tables used by a theme.
bool | removeThemeTable (TeTheme *theme, int tableOrder)
| Removes a table from the theme.
virtual bool | insertGrouping (int themeId, const TeGrouping &grouping)
| Inserts information about a grouping used in a theme.
virtual bool | updateGrouping (int themeId, const TeGrouping &grouping)
| Updates information about a grouping used in a theme.
virtual bool | generateLabelPositions (TeTheme *theme, const std::string &objectId="")
| Generates the label position (x,y) to each object of a theme or of a particular object.
virtual bool | themeExist (string themeName)
| Check whether a given theme already exists in the database.
virtual bool | themeExist (const std::string &viewName, const std::string &userName, const std::string &themeName)
| Check whether a given theme from a specific view already exists in the database.
virtual string | getNewThemeName (const string &n)
| Checks whether a given theme name is valid or already exists in the database.
Legend
Retrieving/Inserting/Modifying/Deleting legends in the database.
virtual bool | insertLegend (TeLegendEntry *legend)=0
| Inserts legend in the database.
virtual bool | updateLegend (TeLegendEntry *legend)
| Updates legend entries in the database.
virtual bool | updateLegend (vector< TeLegendEntry > &legVec)
virtual bool | loadLegend (TeAbstractTheme *theme, const string &visualClass="tevisual")
virtual bool | updateVisual (TeLegendEntry *legend)
virtual bool | updateVisual (vector< TeLegendEntry > &legVec)
Polygon
Accessing/Inserting/Modifying polygon geometries into the database
virtual bool | insertPolygonSet (const string &table, TePolygonSet &ps)
| Inserts a polygon set in a geometry table.
virtual bool | updatePolygonSet (const string &table, TePolygonSet &ps)
| Updates a polygon set in a geometry table.
virtual bool | selectPolygonSet (const string &table, const string &criteria, TePolygonSet &ps)
| Returns all polygons in a table given a criteria expressed as an SQL where statement.
virtual bool | loadPolygonSet (TeTheme *theme, TePolygonSet &ps)
| Returns all polygons that represents objects of a particular theme.
virtual bool | loadPolygonSet (const string &table, const string &geoid, TePolygonSet &ps)
| Returns all polygons that represents objects of a particular geoid.
virtual bool | loadPolygonSet (const string &table, TeBox &box, TePolygonSet &ps)
| Returns all polygons inside a given box.
virtual TeDatabasePortal * | loadPolygonSet (const string &table, TeBox &box)
| Returns a database portal to iterate over the polygons that are inside a given box.
virtual bool | locatePolygon (const string &table, TeCoord2D &pt, TePolygon &polygon, const double &tol=0.0)
| Returns the first polygon that contais a given coordinate.
virtual bool | locatePolygonSet (const string &table, TeCoord2D &pt, double tol, TePolygonSet &polygons)
| Returns the polygons that contains a give coordinate.
virtual bool | insertPolygon (const string &table, TePolygon &p)=0
| Inserts a polygon in a geometry table.
virtual bool | updatePolygon (const string &table, TePolygon &p)=0
| Updates a polygon in a geometry table.
Line
Accessing/Inserting/Modifying Line geometries into the database.
virtual bool | insertLineSet (const string &table, TeLineSet &ls)
virtual bool | updateLineSet (const string &table, TeLineSet &ls)
virtual bool | loadLineSet (const string &table, const string &geoid, TeLineSet &ls)
virtual bool | loadLineSet (TeTheme *theme, TeLineSet &ls)
virtual bool | loadLineSet (const string &table, TeBox &box, TeLineSet &linSet)
virtual TeDatabasePortal * | loadLineSet (const string &table, TeBox &box)
virtual bool | selectLineSet (const string &table, const string &criteria, TeLineSet &ls)
virtual bool | insertLine (const string &table, TeLine2D &l)=0
virtual bool | updateLine (const string &table, TeLine2D &l)=0
virtual bool | locateLine (const string &table, TeCoord2D &pt, TeLine2D &line, const double &tol=0.0)
virtual bool | locateLineSet (const string &table, TeCoord2D &pt, TeLineSet &ls, const double &tol=0.0)
Point
Accessing/Inserting/Modifying Point geometries into the database.
virtual bool | insertPointSet (const string &table, TePointSet &ps)
virtual bool | updatePointSet (const string &table, TePointSet &ps)
virtual bool | loadPointSet (const string &table, TeBox &box, TePointSet &ps)
virtual TeDatabasePortal * | loadPointSet (const string &table, TeBox &box)
virtual bool | loadPointSet (const string &table, const string &geoid, TePointSet &ps)
virtual bool | loadPointSet (TeTheme *theme, TePointSet &ps)
virtual bool | selectPointSet (const string &table, const string &criteria, TePointSet &ps)
virtual bool | insertPoint (const string &table, TePoint &p)=0
virtual bool | updatePoint (const string &table, TePoint &p)
virtual bool | locatePoint (const string &table, TeCoord2D &pt, TePoint &point, const double &tol=0.0)
virtual bool | locatePointSet (const string &table, TeCoord2D &pt, TePointSet &pointSet, const double &tol=0.0)
Text
Accessing/Inserting/Modifying Text geometries into the database.
virtual bool | insertTextSet (const string &table, TeTextSet &ts)
virtual bool | updateTextSet (const string &table, TeTextSet &ts)
virtual bool | loadTextSet (const string &table, const string &geoid, TeTextSet &ts)
virtual bool | selectTextSet (const string &table, const string &criteria, TeTextSet &ts)
virtual bool | insertText (const string &table, TeText &t)=0
virtual bool | updateText (const string &table, TeText &t)
virtual bool | locateText (const string &table, TeCoord2D &pt, TeText &text, const double &tol=0.0)
virtual bool | locateTextSet (const string &table, TeCoord2D &pt, TeTextSet &textSet, const double &tol=0.0)
Arc
Accessing/Inserting/Modifying Arc geometries into the database.
virtual bool | insertArcSet (const string &table, TeArcSet &as)
| Inserts an arc set geometry in the database.
virtual bool | updateArcSet (const string &table, TeArcSet &as)
| Updates arc set geometry in the database.
virtual bool | loadArcSet (const string &table, const string &geoid, TeArcSet &as)
| Loads an arc geometry from the database that has the specified object id (geoid).
virtual bool | insertArc (const string &table, TeArc &arc)=0
| Inserts an arc geometry in the database.
virtual bool | updateArc (const string &table, TeArc &arc)
| Updates an arc geometry in the database.
Node
Accessing/Inserting/Modifying Node geometries into the database.
virtual bool | insertNodeSet (const string &table, TeNodeSet &ns)
virtual bool | updateNodeSet (const string &table, TeNodeSet &ns)
virtual bool | loadNodeSet (const string &table, const string &geoid, TeNodeSet &ps)
virtual bool | insertNode (const string &table, TeNode &node)=0
virtual bool | updateNode (const string &table, TeNode &node)
Cell
Accessing/Inserting/Modifying Cell geometries into the database.
virtual bool | insertCellSet (const string &table, TeCellSet &cs)
virtual bool | updateCellSet (const string &table, TeCellSet &cs)
virtual bool | loadCellSet (const int &layerId, const string &table, const string &geoid, TeCellSet &cs)
virtual bool | selectCellSet (const int &layerId, const string &table, const string &criteria, TeCellSet &cs)
virtual bool | insertCell (const string &table, TeCell &c)=0
virtual bool | updateCell (const string &table, TeCell &c)
virtual bool | locateCell (const string &table, TeCoord2D &pt, TeCell &c, const double &tol=0.0)
topologic relation query
topologic relation query over geometries into the database.
virtual bool | spatialRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, TeDatabasePortal *portal, int relate, const string &actCollTable="")
| Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a subset of geometries of this table (actGeomTable)
virtual bool | spatialRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, const string &visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, int relate, const string &visCollTable="")
| Returns the geometries of a geometric table (visGeomTable) that have a specific spatial relation (relate) with a subset of geometries of other geometric table (actGeomTable)
virtual bool | spatialRelation (const string &actGeomTable, TeGeomRep actRep, TeGeometry *geom, TeDatabasePortal *portal, int relate, const string &actCollTable="")
| Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a geometry in memory (geom)
virtual bool | spatialRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, TeKeys &actIdsOut, int relate, const string &actCollTable="")
| Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a subset of geometries of this table (actGeomTable)
virtual bool | spatialRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, const string &visGeomTable, TeGeomRep visRep, TeKeys &visIdsOut, int relate, const string &visCollTable="", TeDatabase *=0)
| Returns the geometries of a geometric table (visGeomTable) that have a specific spatial relation (relate) with a subset of geometries of other geometric table (actGeomTable)
virtual bool | spatialRelation (const string &actGeomTable, TeGeomRep actRep, TeGeometry *geom, TeKeys &actIdsOut, int relate, const string &actCollTable="")
| Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a geometry in memory (geom)
metric functions
metric functions over geometries into the database.
virtual bool | calculateArea (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, double &area)
| Calculates the area of a geometry set of the geometric table (actGeomTable)
virtual bool | calculateLength (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, double &length)
| Calculates the length of a geometry set of the actGeomTable table.
virtual bool | calculateDistance (const string &actGeomTable, TeGeomRep actRep, TeKeys &Ids, double &distance)
| Calculates the distance between two geometries of the actGeomTable table.
virtual bool | calculateDistance (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, TeGeomRep visRep, const string &objId2, double &distance)
| Calculates the distance between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
virtual bool | withinDistance (const string &actGeomTable, TeGeomRep actRep, const TeCoord2D &point, TeKeysToDist &IdsDistOut, const double &max_distance, const string &actCollTable="")
| Returns the geometries of a geometric table (actGeomTable) that are within a specific distance from a point in memory.
functions that generate new geometries
functions that generate new geometries over geometries into the database.
virtual bool | buffer (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TePolygonSet &bufferSet, double dist)
| Returns the buffers with a specific distance of a geometry set of a geometric table (actGeomTable)
virtual bool | centroid (const string &actGeomTable, TeGeomRep actRep, TePointSet &centroidSet, TeKeys actIds=vector< string >(), const string &actCollTable="")
| Returns the centroids of a geometry set of a geometric table (actGeomTable)
virtual bool | convexHull (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TePolygonSet &convexHullSet)
| Returns the convex geometries of a geometries set of a geometric table (actGeomTable)
set functions
functions of set: union, intersection, difference and symmetrical difference.
virtual bool | geomIntersection (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TeGeometryVect &geomVect)
| Returns the intersection between two geometries of a geometric table (actGeomTable)
virtual bool | geomIntersection (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, TeGeomRep visRep, const string &objId2, TeGeometryVect &geomVect)
| Returns the intersection between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
virtual bool | geomDifference (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &objId2, TeGeometryVect &geomVect)
| Returns the difference between two geometries of a geometric table (actGeomTable)
virtual bool | geomDifference (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, TeGeomRep visRep, const string &objId2, TeGeometryVect &geomVect)
| Returns the difference between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
virtual bool | geomUnion (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TeGeometryVect &geomVect)
| Returns the union between geometries of a geometric table (actGeomTable)
virtual bool | geomUnion (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, TeGeomRep visRep, const string &objId2, TeGeometryVect &geomVect)
| Returns the union between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
virtual bool | geomXOr (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &objId2, TeGeometryVect &geomVect)
| Returns the symmetrical difference between two geometries of a geometric table (actGeomTable)
virtual bool | geomXOr (const string &actGeomTable, TeGeomRep actRep, const string &objId1, const string &visGeomTable, TeGeomRep visRep, const string &objId2, TeGeometryVect &geomVect)
| Returns the symmetrical difference between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
Spatial Operations with raster data
spatial operations over raster data into the database.
virtual bool | zonal (const string &rasterTable, const string &actGeomTable, TeKeys &Ids, TeObjectStatistics &result, const bool &useDummy=true)
| Returns the statistics of raster data regions inside a geometry set of a geometric table (actGeomTable)
virtual bool | zonal (const string &rasterTable, const string &actGeomTable, const string &actCollTable, TeObjectStatistics &result, const bool &useDummy=true)
| Returns the statistics of raster data regions inside a geometry set of a geometric table (actGeomTable)
virtual bool | zonal (const string &rasterTable, TePolygon &poly, TeStatisticsDimensionVect &result, const bool &useDummy=true)
| Returns the statistics of a raster data region inside a geometry in memory.
virtual bool | mask (const string &rasterTable, const string &actGeomTable, const string &objId, const string &nameLayerOut, TeStrategicIterator st)
| Clips a raster data from a geometry of a geometric table (actGeomTable)
virtual bool | mask (const string &rasterTable, TePolygon &poly, const string &nameLayerOut, TeStrategicIterator st)
| Clips a raster data from a geometry in memory (poly)
specifics SQLs
return SQL strings
virtual string | getSQLBoxWhere (const TeBox &box, const TeGeomRep rep, const std::string &tableName)
| Return a string that describes a where clause in SQL to return the geometries inside the box.
virtual string | getSQLBoxWhere (const TeBox &box, const TeGeomRep rep, const std::string &tableName, const std::string &columnName)
| Return a string that describes a where clause in SQL to return the geometries inside the box.
virtual string | getSQLBoxWhere (const string &table1, const string &table2, TeGeomRep rep2, TeGeomRep rep1=TePOLYGONS)
virtual string | getSQLBoxSelect (const string &tableName, TeGeomRep rep)
| Return a string SQL to be used in the clause SELECT to select the box (lower_x, lower_y, upper_x, upper_y)
virtual std::string | getSQLOrderBy (const TeGeomRep &rep) const
virtual string | getSQLStatistics (TeGroupingAttr &attrs)
| Return a string SQL to calculate the statistics of some attributes.
virtual string | getSQLAutoNumber (const string &table)
| Return the database function in SQL to generate autonumber values.
virtual string | getSQLTemporalWhere (TeTimeInterval &, TeTemporalRelation, const string &, const string &)
| Return a string SQL to temporal where.
virtual string | getSQLTemporalWhere (const string &temporalRest)
| Return a string SQL to temporal where.
virtual string | getSQLTemporalWhere (int, int, TeChronon, TeTemporalRelation, const string &, const string &)
| Return a string SQL to temporal where.
virtual string | getSQLTime (const TeTime &) const
| Returns a valid SQL time string.
virtual string | getSQLTemporalFunction (TeChronon chr, const string &colName)
| Returns a SQL temporal expression applied to a column.
Transaction control methods
should be implemented by the drivers that has it. Default implementation is DO NOTHING.
virtual bool | beginTransaction ()
| Begins a transaction.
virtual bool | commitTransaction ()
| Commits a transaction.
virtual bool | rollbackTransaction ()
| Rollbacks a transaction.

## Protected Member Functions

void | alterTableInfoInMemory (const string &updatedTableName, string oldTableName="")
| Update metadata about an attribute table that had its name or columns changed.

## Protected Attributes

bool | isConnected_
| indicates if the connection is open
std::string | host_
| host name of the database server
std::string | user_
| user name
std::string | password_
| user password
std::string | database_
| database name
int | portNumber_
| port number
int | errorNumber_
| error number
std::string | errorMessage_
| error message
std::string | dbmsName_
| DBMS name (Ado, MySQL, Postgres, OracleSpatial)
TeSharedPtr< TeMetaModelCache > | metaModel_
| Meta model: Layers, Themes, Views...
int | transactionCounter_
| counts how many nested transactions have been opened

## Database

Methods related to database and connection creation. These methods return TRUE when the operation was successfull. Otherwise return FALSE and when possible an error message is captured.
virtual bool | newDatabase (const string &database, const string &user, const string &password, const string &host, const int &port=-1, bool terralibModel=true, const std::string &characterSet="")=0
| Creates a new database and open a connection to it.
virtual bool | connect (const string &host, const string &user, const string &password, const string &database, int port=-1)=0
| Opens a connection to a database server passing all parameters needed.
virtual bool | showDatabases (const string &, const string &, const string &, vector< string > &, int=-1)
| Show the server databases (only for MySQL, Oracle and PostgreSQL)
virtual bool | connect (const string &="")
| Opens a connection without parameters. When possible, should be implemented by the derived classes.
bool | isConnected ()
| Check if there is an opened connection.
virtual void | close ()=0
| Closes the connection.
virtual string | getDatabaseDescription ()
| Returns a string that the describes the parameters of the database connected.
static TeDatabase * | DefaultObject (const TeDatabaseFactoryParams &)

## Detailed Description

An abstract database class.

Instances of this classes represent connections to a database server. It includes the host name, user name and password parameters of the connection. It should be implemented by the drivers to specific database servers as: MySQL, Ado, PostgreSQL or any other server to be used in TerraLib applications. When possible, default implementations using ANSI SQL are provided. Methods that rely on special features of the derived driver are left as purely virtual.

See also:
  TeTheme, TeView, TeLayer, TeAttribute

Examples:

  addGeomRepresentation.cpp, copyLayer.cpp, createDatabase.cpp, createLayer.cpp, createProximityMatrix.cpp, createSTElementSetFromLayer.cpp, createSTElementSetFromTheme.cpp, createTable.cpp, createTheme.cpp, databaseQuery.cpp, databaseSQLQuery.cpp, importDBF.cpp, importGeoTab.cpp, importGridData.cpp, importJPEG.cpp, importMIDMIF.cpp, proxMatrixAndSpatialStatistics.cpp, querierFromLayer.cpp, querierFromTheme.cpp, querierGroupChronon.cpp, querierGroupElement.cpp, querierGroupSpatialRest.cpp, querierWithSpatialRestBox.cpp, querierWithSpatialRestGeometry.cpp, rasterSlicing.cpp, spatialQuery.cpp, spatialQueryAndBuffer.cpp, and themeGrouping.cpp.

## Constructor & Destructor Documentation

TeDatabase::TeDatabase | ( |  | ) |

Empty constructor.

TeDatabase::~TeDatabase | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual bool TeDatabase::addColumn | ( | const string & | table,
|  | TeAttributeRep & | rep
| ) |  | `[pure virtual]`

Adds a column to a table.

Parameters:

  table | table name
  rep | representation of the column being created

Implemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

Examples:
  createTable.cpp.

virtual bool TeDatabase::allowEmptyString | ( | const string & | ,
|  | const string & |
| ) |  | `[inline, virtual]`

Update a column.

Reimplemented in TeAdo.

bool TeDatabase::alterTable | ( | const string & | tableName,
|  | TeAttributeRep & | rep,
|  | const string & | oldColName = `""`
| ) |  | `[virtual]`

Alter a property of a table.

Reimplemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::alterTable | ( | const string & | oldTableName,
|  | const string & | newTablename
| ) |  | `[virtual]`

Alter the table name.

Reimplemented in TeAdo, TeOracle, TeSqlServer, TeOCIOracle, TePostgreSQL, and TeSQLite.

void TeDatabase::alterTableInfoInMemory | ( | const string & | updatedTableName,
|  | string | oldTableName = `""`
| ) |  | `[protected]`

Update metadata about an attribute table that had its name or columns changed.

bool TeDatabase::beginTransaction | ( | void |  | ) | `[virtual]`

Begins a transaction.

Reimplemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::buffer | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIds,
|  | TePolygonSet & | bufferSet,
|  | double | dist
| ) |  | `[virtual]`

Returns the buffers with a specific distance of a geometry set of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  actIds | identifiers of the geometry set of the actGeomTable table
  bufferSet | the returned buffers
  dist | the distance of the buffers

Reimplemented in TeOracleSpatial.

Examples:
  spatialQueryAndBuffer.cpp.

bool TeDatabase::calculateArea | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIdsIn,
|  | double & | area
| ) |  | `[virtual]`

Calculates the area of a geometry set of the geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  actIdsIn | identifiers of the geometry set of the actGeomTable table
  area | the returned area value

Reimplemented in TeOracleSpatial.

bool TeDatabase::calculateDistance | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | Ids,
|  | double & | distance
| ) |  | `[virtual]`

Calculates the distance between two geometries of the actGeomTable table.

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  Ids | identifiers of the two geometries of the actGeomTable table
  distance | the returned distance value

Reimplemented in TeOracleSpatial.

bool TeDatabase::calculateDistance | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | const string & | objId2,
|  | double & | distance
| ) |  | `[virtual]`

Calculates the distance between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of the geometry of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  objId2 | identifier of the geometry of the visGeomTable table
  distance | the returned distance value

Reimplemented in TeOracleSpatial.

bool TeDatabase::calculateLength | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIdsIn,
|  | double & | length
| ) |  | `[virtual]`

Calculates the length of a geometry set of the actGeomTable table.

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  actIdsIn | identifiers of the geometry set of the actGeomTable table
  length | the returned length value

Reimplemented in TeOracleSpatial.

bool TeDatabase::centroid | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TePointSet & | centroidSet,
|  | TeKeys | actIds = `vector<string>()`,
|  | const string & | actCollTable = `""`
| ) |  | `[virtual]`

Returns the centroids of a geometry set of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  centroidSet | the returned centroids
  actIds | identifiers of the geometry set of the actGeomTable table
  actCollTable | collection table name associated with the actGeomTable table

Reimplemented in TeOracleSpatial.

Examples:
  addGeomRepresentation.cpp.

void TeDatabase::clear | ( |  | ) | `[virtual]`

Clears structures in memory (legendMap, layerMap, viewMap...) used to optimize database access.

virtual void TeDatabase::close | ( |  | ) | `[pure virtual]`

Closes the connection.

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

Examples:
  addGeomRepresentation.cpp, copyLayer.cpp, createDatabase.cpp, createLayer.cpp, createProximityMatrix.cpp, createSTElementSetFromLayer.cpp, createSTElementSetFromTheme.cpp, createTable.cpp, createTheme.cpp, databaseQuery.cpp, databaseSQLQuery.cpp, importDBF.cpp, importGeoTab.cpp, importGridData.cpp, importJPEG.cpp, importMIDMIF.cpp, proxMatrixAndSpatialStatistics.cpp, querierFromLayer.cpp, querierFromTheme.cpp, querierGroupChronon.cpp, querierGroupElement.cpp, querierGroupSpatialRest.cpp, querierWithSpatialRestBox.cpp, querierWithSpatialRestGeometry.cpp, rasterSlicing.cpp, spatialQuery.cpp, spatialQueryAndBuffer.cpp, and themeGrouping.cpp.

virtual bool TeDatabase::columnExist | ( | const string & | table,
|  | const string & | column,
|  | TeAttribute & | attr
| ) |  | `[pure virtual]`

Verifies if a table has a column.

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::commitTransaction | ( | void |  | ) | `[virtual]`

Commits a transaction.

Reimplemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual string TeDatabase::concatValues | ( | vector< string > & | values,
|  | const string & | unionString
| ) |  | `[pure virtual]`

Concat values in a vector using unionString as the join between each value.

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::connect | ( | const string & | host,
|  | const string & | user,
|  | const string & | password,
|  | const string & | database,
|  | int | port = `-1`
| ) |  | `[pure virtual]`

Opens a connection to a database server passing all parameters needed.

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

Examples:
  addGeomRepresentation.cpp, copyLayer.cpp, createLayer.cpp, createProximityMatrix.cpp, createSTElementSetFromLayer.cpp, createSTElementSetFromTheme.cpp, createTable.cpp, createTheme.cpp, databaseQuery.cpp, databaseSQLQuery.cpp, importDBF.cpp, importGeoTab.cpp, importGridData.cpp, importJPEG.cpp, importMIDMIF.cpp, proxMatrixAndSpatialStatistics.cpp, querierFromLayer.cpp, querierFromTheme.cpp, querierGroupChronon.cpp, querierGroupElement.cpp, querierGroupSpatialRest.cpp, querierWithSpatialRestBox.cpp, querierWithSpatialRestGeometry.cpp, rasterSlicing.cpp, spatialQuery.cpp, spatialQueryAndBuffer.cpp, and themeGrouping.cpp.

virtual bool TeDatabase::connect | ( | const string & | = `""` | ) | `[inline, virtual]`

Opens a connection without parameters. When possible, should be implemented by the derived classes.

Reimplemented in TeAdo.

bool TeDatabase::convexHull | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIds,
|  | TePolygonSet & | convexHullSet
| ) |  | `[virtual]`

Returns the convex geometries of a geometries set of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  actIds | identifiers of the geometry set of the actGeomTable table
  convexHullSet | the returned convex geometries

Reimplemented in TeOracleSpatial.

bool TeDatabase::createArcGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for a arc geometries.

bool TeDatabase::createCellGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for cell geometries.

bool TeDatabase::createCollectionTable | ( | const string & | tableName | ) | `[virtual]`

Creates a table to store information about objects in a theme.

bool TeDatabase::createConceptualModel | ( | bool | withIntegrity = `true`,
|  | bool | newDatabase = `true`,
|  | bool | createIndex = `true`
| ) |  | `[virtual]`

Creates the entire TerraLib conceptual model.

bool TeDatabase::createDatabaseTable | ( |  | ) | `[virtual]`

Creates a table to store version database information.

bool TeDatabase::createDatumTable | ( |  | ) | `[virtual]`

Creates a table to store datum information.

bool TeDatabase::createGroupingTable | ( |  | ) | `[virtual]`

Creates a table to store the groupings associated with a theme.

bool TeDatabase::createIndex | ( | const string & | tableName,
|  | const string & | indexName,
|  | const string & | columnsName
| ) |  | `[virtual]`

Create the indexes for the tables in the conceptual model.

bool TeDatabase::createLayerTable | ( |  | ) | `[virtual]`

Creates a table to store Layers information.

bool TeDatabase::createLayerTableTable | ( |  | ) | `[virtual]`

Creates a table to store information about the non-spatial tables associated to this layer.

bool TeDatabase::createLegendTable | ( |  | ) | `[virtual]`

Creates a table to store legends.

bool TeDatabase::createLineGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for line geometries.

bool TeDatabase::createLUTTable | ( | const string & | name | ) | `[virtual]`

Creates a lookup table (used for pallete raster representations)

bool TeDatabase::createNodeGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for a node geometries.

bool TeDatabase::createPointGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for point geometries.

bool TeDatabase::createPolygonGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for a polygon geometries.

bool TeDatabase::createProjectionTable | ( |  | ) | `[virtual]`

Creates a table to store projectinon information.

bool TeDatabase::createProjectTable | ( |  | ) | `[virtual]`

Creates a table to store information about projects: an structure that groups views.

bool TeDatabase::createProjectViewTable | ( |  | ) | `[virtual]`

Creates a table to store the relation between project/views information.

bool TeDatabase::createRasterGeometry | ( | const string & | tableName | ) | `[virtual]`

Creates a table to store raster representations of objects.

bool TeDatabase::createRasterMetadataTable | ( | const string & | tableName | ) | `[virtual]`

Creates a table to store information about raster representation.

bool TeDatabase::createRasterTable | ( | const string & | tableName | ) | `[virtual]`

Creates a table for raster geometries.

virtual bool TeDatabase::createRelation | ( | const string & | relName,
|  | const string & | table,
|  | const string & | fieldName,
|  | const string & | relatedTable,
|  | const string & | relatedField,
|  | bool | cascadeDeletion
| ) |  | `[pure virtual]`

Creates a reationship between two tables.

Parameters:

  relName | relationship name
  table | table that will receive the foreign key
  fieldName | column that will be foreign key
  relatedTable | table that exports the foreign key
  relatedField | field that will the exported foreign key
  cascadeDeletion | flag that indicates if the deletion should be propagated

Implemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::createRepresentationTable | ( |  | ) | `[virtual]`

Creates a table to store Representations information.

bool TeDatabase::createSpatialIndex | ( | const string & | table,
|  | const string & | columns,
|  | TeSpatialIndexType | = `TeRTREE`,
|  | short | = `0`,
|  | short | = `0`
| ) |  | `[virtual]`

Creates a spatial index for a spatial table. In order to get correct column names to index, see getSpatialIdxColumn method.

Reimplemented in TeSqlServerSpatial, TeFirebird, TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::createSRSTable | ( |  | ) | `[virtual]`

Creates a table to relate the TerraLib projection with a SRS id.

virtual bool TeDatabase::createTable | ( | const string & | table,
|  | TeAttributeList & | attr
| ) |  | `[pure virtual]`

Creates a table.

Parameters:

  table | table name
  attr | table list of attributes

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

Examples:
  createTable.cpp.

bool TeDatabase::createTablesRelationTable | ( |  | ) | `[virtual]`

Creates a table to store information about the external tables related to non-spatial tables of layers.

bool TeDatabase::createTextGeometry | ( | const string & | tableName,
|  | const int & | epsgCode = `-1`
| ) |  | `[virtual]`

Creates a table for a text geometries.

bool TeDatabase::createThemeTable | ( |  | ) | `[virtual]`

Creates a table to store Themes information.

bool TeDatabase::createThemeTablesTable | ( |  | ) | `[virtual]`

Creates a table to store information about the attribute tables used by a theme.

bool TeDatabase::createViewTable | ( |  | ) | `[virtual]`

Creates a table to store Views information.

bool TeDatabase::createVisualRasterTable | ( |  | ) | `[virtual]`

Creates a table to store raster visual definitions.

bool TeDatabase::createVisualTable | ( |  | ) | `[virtual]`

Creates a table to store visual definitions.

string TeDatabase::databaseName | ( |  | ) | `[inline]`

Returns the database name of the connection opened.

string TeDatabase::dbmsName | ( |  | ) | `[inline]`

Returns the Database Management System name.

static TeDatabase* TeDatabase::DefaultObject | ( | const TeDatabaseFactoryParams & |  | ) | `[inline, static]`

This is for TeFactory compatibility ( Invalid TeDatabaseFactory requests will try to create an default object using this function ).

bool TeDatabase::defineIntegrity | ( | void |  | ) | `[virtual]`

Creates the referencial integrity of the conceptual model.

Reimplemented in TeMySQL.

bool TeDatabase::deleteColumn | ( | const string & | table,
|  | const string & | colName
| ) |  | `[virtual]`

Deletes a column to a table.

Parameters:

  table | table name
  colName | name of the column being deleted

Reimplemented in TeAdo.

bool TeDatabase::deleteIndex | ( | const string & | tableName,
|  | const string & | indexName
| ) |  | `[virtual]`

Delete the index from tables in the conceptual model.

Reimplemented in TeMySQL.

bool TeDatabase::deleteLayer | ( | int | layerId | ) | `[virtual]`

Delete a particular layer passing its id.

Reimplemented in TeOracle, TeSqlServer, and TeOCIOracle.

bool TeDatabase::deleteLayerTable | ( | int | layerId,
|  | TeAttrTableType | ttype = `TeAttrStatic`
| ) |  | `[virtual]`

Deletes all tables, of a particular type, associated to a layer.

bool TeDatabase::deleteLegend | ( | int | themeId | ) | `[virtual]`

Erases the legends of a theme identified by themeId.

bool TeDatabase::deleteProject | ( | int | projectId | ) | `[virtual]`

Delete a project from the database.

bool TeDatabase::deleteProjection | ( | const unsigned int & | projId | ) | `[virtual]`

Removes a projection from the database.

bool TeDatabase::deleteProjectViewRel | ( | int | projectId,
|  | int | viewId
| ) |  | `[virtual]`

Deletes a project/view relation.

bool TeDatabase::deleteRelation | ( | const string & | name,
|  | const string & | table
| ) |  | `[virtual]`

Removes a relation exist.

Parameters:

  name | relationship name
  table | table where the relashionship exists

Returns:
  TRUE if succeed and FALSE otherwise

bool TeDatabase::deleteTable | ( | const string & | table | ) | `[virtual]`

Deletes a table. Do not allow the deletion of model tables.

Reimplemented in TeOracle, TeSqlServer, TeOCIOracle, and TePostgreSQL.

bool TeDatabase::deleteTheme | ( | int | themeId | ) | `[virtual]`

Erases the theme identified by themeId.

Reimplemented in TeSqlServer.

bool TeDatabase::deleteThemeGroup | ( | int | themeId | ) | `[virtual]`

Erases the theme group identified by themeId.

bool TeDatabase::deleteView | ( | int | viewId | ) | `[virtual]`

Delete a view.

Reimplemented in TeSqlServer.

virtual bool TeDatabase::dropDatabase | ( | const std::string & |  | ) | `[inline, virtual]`

Drop a database.

Reimplemented in TeSqlServer, TeMySQL, and TePostgreSQL.

bool TeDatabase::dropDBView | ( | const string & | dbViewName | ) | `[virtual]`

Drops a database view.

virtual string TeDatabase::errorMessage | ( |  | ) | `[inline, virtual]`

Returns the error message from the server.

Reimplemented in TeMySQL, TePostgreSQL, and TeSQLite.

Examples:
  addGeomRepresentation.cpp, copyLayer.cpp, createDatabase.cpp, createLayer.cpp, createProximityMatrix.cpp, createSTElementSetFromLayer.cpp, createSTElementSetFromTheme.cpp, createTable.cpp, createTheme.cpp, databaseQuery.cpp, databaseSQLQuery.cpp, importDBF.cpp, importGeoTab.cpp, importGridData.cpp, importJPEG.cpp, importMIDMIF.cpp, proxMatrixAndSpatialStatistics.cpp, querierFromLayer.cpp, querierFromTheme.cpp, querierGroupChronon.cpp, querierGroupElement.cpp, querierGroupSpatialRest.cpp, querierWithSpatialRestBox.cpp, querierWithSpatialRestGeometry.cpp, rasterSlicing.cpp, spatialQuery.cpp, spatialQueryAndBuffer.cpp, and themeGrouping.cpp.

virtual int TeDatabase::errorNum | ( |  | ) | `[inline, virtual]`

Returns the error number from the server.

Reimplemented in TeMySQL.

virtual string TeDatabase::escapeSequence | ( | const string & | from | ) | `[pure virtual]`

Escape special characters in a string to be used in a SQL statement.

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::execute | ( | const string & | sql | ) | `[pure virtual]`

Executes a SQL command that doesnt return a record set. Tipically a data definition comand.

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual TeDBRelationType TeDatabase::existRelation | ( | const string & | tableName,
|  | const string & | relName
| ) |  | `[pure virtual]`

Checks if a relation exist.

Parameters:

  tableName | table where the relashionship exists
  relName | relationship name

Implemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::generateLabelPositions | ( | TeTheme * | theme,
|  | const std::string & | objectId = `""`
| ) |  | `[virtual]`

Generates the label position (x,y) to each object of a theme or of a particular object.

Reimplemented in TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::geomDifference | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | objId2,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the difference between two geometries of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of a geometry of the actGeomTable table
  objId2 | identifier of other geometry of the actGeomTable table
  geomVect | the returned difference

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomDifference | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | const string & | objId2,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the difference between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of a geometry of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  objId2 | identifier of other geometry of the visGeomTable table
  geomVect | the returned difference

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomIntersection | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIds,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the intersection between two geometries of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  actIds | identifiers of the geometry set of the actGeomTable table
  geomVect | the returned intersection

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomIntersection | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | const string & | objId2,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the intersection between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of a geometry of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  objId2 | identifier of other geometry of the visGeomTable table
  geomVect | the returned intersection

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomUnion | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIds,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the union between geometries of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  actIds | identifiers of the geometry set of the actGeomTable table
  geomVect | the returned union

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomUnion | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | const string & | objId2,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the union between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of a geometry of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  objId2 | identifier of other geometry of the visGeomTable table
  geomVect | the returned union

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomXOr | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | objId2,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the symmetrical difference between two geometries of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of a geometry of the actGeomTable table
  objId2 | identifier of other geometry of the actGeomTable table
  geomVect | the returned symmetrical difference

Reimplemented in TeOracleSpatial.

bool TeDatabase::geomXOr | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | const string & | objId2,
|  | TeGeometryVect & | geomVect
| ) |  | `[virtual]`

Returns the symmetrical difference between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of a geometry of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  objId2 | identifier of other geometry of the visGeomTable table
  geomVect | the returned symmetrical difference

Reimplemented in TeOracleSpatial.

bool TeDatabase::getAttributeList | ( | const string & | tableName,
|  | TeAttributeList & | attList
| ) |  | `[virtual]`

Gets the list of attributes of a table.

Reimplemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::getAttrTables | ( | TeAttrTableVector & | atts,
|  | TeAttrTableType | attType = `TeAllAttrTypes`
| ) |  | `[virtual]`

Retrieves information about some tables.

Examples:
  importDBF.cpp.

virtual std::string TeDatabase::getClientEncoding | ( |  | ) | `[inline, virtual]`

Gets the client encoding.

Reimplemented in TeMySQL, and TePostgreSQL.

string TeDatabase::getConcatFieldsExpression | ( | const vector< string > & | fNamesVec | ) | `[virtual]`

Concatenate field values.

Parameters:

  fNamesVec | vector containing the fields to be concatenated

Reimplemented in TeFirebird, and TeMySQL.

TeConnection * TeDatabase::getConnection | ( |  | ) | `[virtual]`

Gets the connection used by database.

Note:
  The caller of this method will take the ownership of the returned pointer.

Reimplemented in TeFirebird, and TePostgreSQL.

string TeDatabase::getDatabaseDescription | ( |  | ) | `[virtual]`

Returns a string that the describes the parameters of the database connected.

virtual bool TeDatabase::getEncodingList | ( | const std::string & | ,
|  | const std::string & | ,
|  | const std::string & | ,
|  | const int & | ,
|  | std::vector< std::string > & |
| ) |  | `[inline, virtual]`

Retrives the list of available character sets.

Reimplemented in TeMySQL, TePostGIS, and TePostgreSQL.

virtual bool TeDatabase::getEncodingList | ( | std::vector< std::string > & |  | ) | `[inline, virtual]`

Retrives the list of available character sets.

Reimplemented in TeMySQL, and TePostgreSQL.

bool TeDatabase::getIndexesFromTable | ( | const string & | tableName,
|  | std::vector< TeDatabaseIndex > & | vecIndexes
| ) |  | `[virtual]`

Return a TeDatabaseIndex vector from a table.

Reimplemented in TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::getMBRGeom | ( | string | tableGeom,
|  | string | object_id,
|  | TeBox & | box,
|  | string | colGeom
| ) |  | `[virtual]`

Return the box of a specific geometry (object_id)

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::getMBRSelectedObjects | ( | string | geomTable,
|  | string | colGeom,
|  | string | fromClause,
|  | string | whereClause,
|  | string | afterWhereClause,
|  | TeGeomRep | repType,
|  | TeBox & | bout,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

Return the box of a select objects set.

Reimplemented in TeSqlServerSpatial, TeOracleSpatial, TePostGIS, and TePostgreSQL.

string TeDatabase::getNewLayerName | ( | const string & | n | ) | `[virtual]`

Checks whether a given layer name is valid or already exists in the database.

Parameters:

  n | layer name to be checked

Returns:
  the modified valid layer name

string TeDatabase::getNewTableName | ( | const string & | n | ) |

Return a valid name for a table from a initial one.

string TeDatabase::getNewThemeName | ( | const string & | n | ) | `[virtual]`

Checks whether a given theme name is valid or already exists in the database.

Parameters:

  n | theme name to be checked

Returns:
  the modified valid theme name

virtual TeDatabasePortal* TeDatabase::getPortal | ( |  | ) | `[pure virtual]`

Returns a database portal.

A database portal is used to submit queries to the database and to navigate over the resulting record set

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

Examples:
  createTable.cpp, and databaseSQLQuery.cpp.

string TeDatabase::getRasterTable | ( | int | layerId,
|  | const string & | objectId
| ) |  | `[virtual]`

Returns the name of the table where the raster geometry associated to an object of a leyr.

Parameters:

  layerId | layer unique database identification
  objectId | identification of the object associated to the raster geometry

string TeDatabase::getSpatialIdxColumn | ( | TeGeomRep | rep | ) | `[virtual]`

Returns the name of the column that wiil be the spatially indexed, for a given type of geometry table.

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

string TeDatabase::getSQLAutoNumber | ( | const string & | table | ) | `[virtual]`

Return the database function in SQL to generate autonumber values.

Reimplemented in TeOracle, and TeOCIOracle.

string TeDatabase::getSQLBoxSelect | ( | const string & | tableName,
|  | TeGeomRep | rep
| ) |  | `[virtual]`

Return a string SQL to be used in the clause SELECT to select the box (lower_x, lower_y, upper_x, upper_y)

Returns a string SQL to be used in the ORDER BY clause when querying geometries.

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

string TeDatabase::getSQLBoxWhere | ( | const TeBox & | box,
|  | const TeGeomRep | rep,
|  | const std::string & | tableName
| ) |  | `[virtual]`

Return a string that describes a where clause in SQL to return the geometries inside the box.

Reimplemented in TeSqlServerSpatial, TeOracleSpatial, TePostGIS, and TePostgreSQL.

Examples:
  databaseSQLQuery.cpp.

string TeDatabase::getSQLBoxWhere | ( | const string & | table1,
|  | const string & | table2,
|  | TeGeomRep | rep2,
|  | TeGeomRep | rep1 = `TePOLYGONS`
| ) |  | `[virtual]`

Return a string that describes a where clause in SQL to return the geometries of the table2 that are inside the geometries box of the table1 (table1 must have lower_x, lower_y...)

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

string TeDatabase::getSQLBoxWhere | ( | const TeBox & | box,
|  | const TeGeomRep | rep,
|  | const std::string & | tableName,
|  | const std::string & | columnName
| ) |  | `[virtual]`

Return a string that describes a where clause in SQL to return the geometries inside the box.

Reimplemented in TeOracleSpatial.

std::string TeDatabase::getSQLOrderBy | ( | const TeGeomRep & | rep | ) | const`[virtual]`

Reimplemented in TeSqlServerSpatial, TeOracleSpatial, TePostGIS, and TeSQLite.

string TeDatabase::getSQLStatistics | ( | TeGroupingAttr & | attrs | ) | `[virtual]`

Return a string SQL to calculate the statistics of some attributes.

Reimplemented in TeOCIOracle, and TePostgreSQL.

string TeDatabase::getSQLTemporalFunction | ( | TeChronon | chr,
|  | const string & | colName
| ) |  | `[virtual]`

Returns a SQL temporal expression applied to a column.

string TeDatabase::getSQLTemporalWhere | ( | TeTimeInterval & | timeInterval,
|  | TeTemporalRelation | timeOperator,
|  | const string & | initialTime,
|  | const string & | finalTime
| ) |  | `[virtual]`

Return a string SQL to temporal where.

Reimplemented in TePostgreSQL.

string TeDatabase::getSQLTemporalWhere | ( | int | time1,
|  | int | time2,
|  | TeChronon | chr,
|  | TeTemporalRelation | rel,
|  | const string & | initialTime,
|  | const string & | finalTime
| ) |  | `[virtual]`

Return a string SQL to temporal where.

Reimplemented in TeAdo, TeFirebird, TeMySQL, and TePostgreSQL.

string TeDatabase::getSQLTemporalWhere | ( | const string & | temporalRest | ) | `[virtual]`

Return a string SQL to temporal where.

virtual string TeDatabase::getSQLTime | ( | const TeTime & |  | ) | const`[inline, virtual]`

Returns a valid SQL time string.

Reimplemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

string TeDatabase::getTableName | ( | int | tableId | ) |

Return the name of an attribute table given its identifier.

TeBox TeDatabase::getThemeBox | ( | TeTheme * | theme | ) | `[virtual]`

Returns theme box.

string TeDatabase::host | ( |  | ) | `[inline]`

Returns the host name of the connection opened.

bool TeDatabase::inClauseValues | ( | const string & | query,
|  | const string & | attribute,
|  | vector< string > & | inClauseVector
| ) |  | `[virtual]`

Get the values that satisfy the query.

Reimplemented in TeFirebird, and TeMySQL.

virtual bool TeDatabase::insertArc | ( | const string & | table,
|  | TeArc & | arc
| ) |  | `[pure virtual]`

Inserts an arc geometry in the database.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertArcSet | ( | const string & | table,
|  | TeArcSet & | as
| ) |  | `[virtual]`

Inserts an arc set geometry in the database.

Reimplemented in TeAdo, and TeOracle.

bool TeDatabase::insertBlob | ( | const string & | tableName,
|  | const string & | columnBlob,
|  | TeAttributeRep & | columnId,
|  | const string & | valueId,
|  | unsigned char * | data,
|  | int | size
| ) |  | `[virtual]`

Saves a large binary objects (BLOB) in a row table.

bool TeDatabase::insertBlob | ( | const string & | tableName,
|  | const string & | columnBlob,
|  | TeAttributeRep & | columnId,
|  | const string & | valueId,
|  | const string & | fileName
| ) |  | `[virtual]`

Saves a large binary objects (BLOB) in a row table.

virtual bool TeDatabase::insertBlob | ( | const string & | tableName,
|  | const string & | columnBlob,
|  | const string & | whereClause,
|  | unsigned char * | data,
|  | int | size
| ) |  | `[pure virtual]`

Saves a large binary objects (BLOB) in a row table.

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertBlob | ( | const string & | tableName,
|  | const string & | columnBlob,
|  | const string & | whereClause,
|  | const string & | fileName
| ) |  | `[virtual]`

Saves a large binary objects (BLOB) in a row table.

virtual bool TeDatabase::insertCell | ( | const string & | table,
|  | TeCell & | c
| ) |  | `[pure virtual]`

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertCellSet | ( | const string & | table,
|  | TeCellSet & | cs
| ) |  | `[virtual]`

Reimplemented in TeAdo, and TeOracle.

bool TeDatabase::insertDatum | ( | const TeDatum & | datum | ) | `[virtual]`

Insert information about a datum.

bool TeDatabase::insertGrouping | ( | int | themeId,
|  | const TeGrouping & | grouping
| ) |  | `[virtual]`

Inserts information about a grouping used in a theme.

virtual bool TeDatabase::insertLayer | ( | TeLayer * | layer | ) | `[pure virtual]`

Insert information about a layer.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertLegend | ( | TeLegendEntry * | legend | ) | `[pure virtual]`

Inserts legend in the database.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertLine | ( | const string & | table,
|  | TeLine2D & | l
| ) |  | `[pure virtual]`

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertLineSet | ( | const string & | table,
|  | TeLineSet & | ls
| ) |  | `[virtual]`

Reimplemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeMySQL, and TeOCIOracle.

virtual bool TeDatabase::insertMetadata | ( | const string & | ,
|  | const string & | ,
|  | double | ,
|  | double | ,
|  | TeBox & | ,
|  | short | = `0`
| ) |  | `[inline, virtual]`

Creates a spatial metadata for a spatial table. It is implemented only in spatial databases.

Reimplemented in TeOracleSpatial.

virtual bool TeDatabase::insertNode | ( | const string & | table,
|  | TeNode & | node
| ) |  | `[pure virtual]`

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertNodeSet | ( | const string & | table,
|  | TeNodeSet & | ns
| ) |  | `[virtual]`

Reimplemented in TeAdo, and TeOracle.

virtual bool TeDatabase::insertPoint | ( | const string & | table,
|  | TePoint & | p
| ) |  | `[pure virtual]`

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertPointSet | ( | const string & | table,
|  | TePointSet & | ps
| ) |  | `[virtual]`

Reimplemented in TeAdo, TeOracle, TeSqlServer, and TeSqlServerSpatial.

virtual bool TeDatabase::insertPolygon | ( | const string & | table,
|  | TePolygon & | p
| ) |  | `[pure virtual]`

Inserts a polygon in a geometry table.

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertPolygonSet | ( | const string & | table,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Inserts a polygon set in a geometry table.

Reimplemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeMySQL, and TeOCIOracle.

virtual bool TeDatabase::insertProject | ( | TeProject * | project | ) | `[pure virtual]`

Insert information about a project.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertProjection | ( | TeProjection * | proj | ) | `[pure virtual]`

Insert information about a geographical projection.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertProjectViewRel | ( | int | projectId,
|  | int | viewId
| ) |  | `[virtual]`

Insert a project/view relation.

virtual bool TeDatabase::insertRasterBlock | ( | const string & | table,
|  | const string & | blockId,
|  | const TeCoord2D & | ll,
|  | const TeCoord2D & | ur,
|  | unsigned char * | buf,
|  | unsigned long | size,
|  | int | band = `0`,
|  | unsigned int | res = `1`,
|  | unsigned int | subband = `0`
| ) |  | `[pure virtual]`

Insert a raster block into the database.

Parameters:

  table | table name
  blockId | block unique identifier
  ll | block lower left coordinate
  ur | block upper right coordinate
  buf | block binary data
  size | block size
  band | block band
  res | block resolution factor
  subband | sub band definitiion

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertRasterGeometry | ( | const string & | tableName,
|  | TeRasterParams & | par,
|  | const string & | objectId = `""`
| ) |  | `[virtual]`

Inserts information about a raster geometry associated to an object.

Parameters:

  tableName | name of the table that stores the raster representation
  par | raster parameters
  objectId | identification of the object associated to the raster geometry

Reimplemented in TeFirebird.

bool TeDatabase::insertRasterMetadata | ( | const string & | tableName,
|  | int | geomId,
|  | TeRasterParams & | par
| ) |  | `[virtual]`

Inserts metadata information about a particular raster geometry.

Parameters:

  tableName | name of the table that stores the metadata
  geomId | geometry unique database identification
  par | raster parameters

bool TeDatabase::insertRasterVisual | ( | int | themeId,
|  | TeRasterVisual * | rasterVisual
| ) |  | `[virtual]`

Insert raster visual.

virtual bool TeDatabase::insertRelationInfo | ( | const int | tableId,
|  | const string & | tField,
|  | const string & | rTable,
|  | const string & | rField,
|  | int & | relId
| ) |  | `[pure virtual]`

Inserts information about a link to an external table.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertRepresentation | ( | int | layerId,
|  | TeRepresentation & | rep
| ) |  | `[pure virtual]`

Inserts information about a geometrical representation.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertSRSId | ( | TeProjection * | proj,
|  | int | srsId
| ) |  | `[virtual]`

Insert relation between TerraLib projection and a SRS id.

bool TeDatabase::insertTable | ( | TeTable & | table | ) | `[virtual]`

Saves a table and its contents in the database.

Reimplemented in TeAdo, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, and TePostgreSQL.

Examples:
  createTable.cpp.

virtual bool TeDatabase::insertTableInfo | ( | int | layerId,
|  | TeTable & | table,
|  | const string & | user = `""`
| ) |  | `[pure virtual]`

Inserts information about an attribute table.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertText | ( | const string & | table,
|  | TeText & | t
| ) |  | `[pure virtual]`

Implemented in TeAdo, TeOracle, TeSqlServer, TeSqlServerSpatial, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertTextSet | ( | const string & | table,
|  | TeTextSet & | ts
| ) |  | `[virtual]`

Reimplemented in TeAdo, TeOracle, TeSqlServer, and TeSqlServerSpatial.

virtual bool TeDatabase::insertTheme | ( | TeAbstractTheme * | theme | ) | `[pure virtual]`

Inserts an abstract theme in the database.

Implemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertThemeGroup | ( | TeViewTree * | tree | ) | `[pure virtual]`

Inserts a group of themes in the database.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertThemeTable | ( | TeTheme * | theme,
|  | TeTable & | inputTable
| ) |  |

Inserts information about a table used by a theme.

virtual bool TeDatabase::insertThemeTable | ( | int | themeId,
|  | int | tableId,
|  | int | relationId,
|  | int | tableOrder
| ) |  | `[pure virtual]`

Inserts information about a table used by a theme.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

virtual bool TeDatabase::insertView | ( | TeView * | view | ) | `[pure virtual]`

Inserts a view.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

Examples:
  createTheme.cpp, and rasterSlicing.cpp.

virtual bool TeDatabase::insertViewTree | ( | TeViewTree * | tree | ) | `[pure virtual]`

Recursive inserting of a view tree.

Implemented in TeAdo, TeOracle, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::insertVisual | ( | TeLegendEntry * | legend | ) | `[virtual]`

Inserts the entire visual of a Legend.

TeThemeMap& TeDatabase::invalidThemeMap | ( |  | ) | `[inline]`

Returns the map of invalid themes in the database.

bool TeDatabase::isConnected | ( |  | ) | `[inline]`

Check if there is an opened connection.

bool TeDatabase::layerExist | ( | int | id | ) | `[virtual]`

Check if a particular layer exists (passing its id)

Examples:
  createLayer.cpp, createSTElementSetFromLayer.cpp, importGeoTab.cpp, importGridData.cpp, importJPEG.cpp, importMIDMIF.cpp, importShape.cpp, and spatialQuery.cpp.

bool TeDatabase::layerExist | ( | string | layerName | ) | `[virtual]`

Check if a particular layer exists (passing its name)

Reimplemented in TeFirebird.

TeLayerMap& TeDatabase::layerMap | ( |  | ) | `[inline]`

Returns the map of layers in the database.

Examples:
  importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

virtual string TeDatabase::leftString | ( | const string & | ,
|  | const int & |
| ) |  | `[inline, virtual]`

Returns the SQL function for substring that starts from left to right with informed length.

Reimplemented in TePostgreSQL.

TeLegendEntryMap& TeDatabase::legendMap | ( |  | ) | `[inline]`

Returns the map of legends in the database.

virtual bool TeDatabase::listDatabases | ( | std::vector< std::string > & |  | ) | `[inline, virtual]`

Returns a lista of databases.

Reimplemented in TeSqlServer, TeMySQL, and TePostgreSQL.

virtual bool TeDatabase::listTables | ( | vector< string > & |  | ) | `[inline, virtual]`

Returns a list of tables in a database.

Reimplemented in TeAdo, TeOracle, TeOCIOracle, and TePostgreSQL.

bool TeDatabase::loadArcSet | ( | const string & | table,
|  | const string & | geoid,
|  | TeArcSet & | as
| ) |  | `[virtual]`

Loads an arc geometry from the database that has the specified object id (geoid).

bool TeDatabase::loadCellSet | ( | const int & | layerId,
|  | const string & | table,
|  | const string & | geoid,
|  | TeCellSet & | cs
| ) |  | `[virtual]`

bool TeDatabase::loadDatum | ( | TeDatum & | datum | ) | `[virtual]`

Retrieves information about a datum projection identified by its name.

bool TeDatabase::loadDatumSet | ( |  | ) | `[virtual]`

Loads the set of datum defined on database.

bool TeDatabase::loadExternalThemes | ( | std::vector< TeAbstractTheme * > & | vecExternalThemes | ) | `[virtual]`

Loads several external themes from the database. Created for otimization.

bool TeDatabase::loadLayer | ( | TeLayer * | layer,
|  | const bool & | loadAttrList = `true`
| ) |  | `[virtual]`

Load information about a particular layer.

Examples:
  addGeomRepresentation.cpp, copyLayer.cpp, createProximityMatrix.cpp, createSTElementSetFromLayer.cpp, createSTElementSetFromTheme.cpp, createTheme.cpp, databaseQuery.cpp, databaseSQLQuery.cpp, proxMatrixAndSpatialStatistics.cpp, querierFromLayer.cpp, spatialQuery.cpp, and spatialQueryAndBuffer.cpp.

TeRaster * TeDatabase::loadLayerRaster | ( | int | layerId,
|  | const string & | objectId = `""`,
|  | const char & | mode = `'r'`
| ) |  | `[virtual]`

Returns the raster associated to a layer.

bool TeDatabase::loadLayerSet | ( | const bool & | loadAttrList = `true` | ) | `[virtual]`

Load information about all layers stored in the database.

Examples:
  importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

bool TeDatabase::loadLayerTable | ( | TeLayer * | layer,
|  | const bool & | loadAttrList = `true`
| ) |  | `[virtual]`

Load layer tables.

bool TeDatabase::loadLegend | ( | TeAbstractTheme * | theme,
|  | const string & | visualClass = `"tevisual"`
| ) |  | `[virtual]`

TeDatabasePortal * TeDatabase::loadLineSet | ( | const string & | table,
|  | TeBox & | box
| ) |  | `[virtual]`

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::loadLineSet | ( | const string & | table,
|  | const string & | geoid,
|  | TeLineSet & | ls
| ) |  | `[virtual]`

Reimplemented in TeOracleSpatial, and TePostGIS.

bool TeDatabase::loadLineSet | ( | const string & | table,
|  | TeBox & | box,
|  | TeLineSet & | linSet
| ) |  | `[virtual]`

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::loadLineSet | ( | TeTheme * | theme,
|  | TeLineSet & | ls
| ) |  | `[virtual]`

bool TeDatabase::loadNodeSet | ( | const string & | table,
|  | const string & | geoid,
|  | TeNodeSet & | ps
| ) |  | `[virtual]`

bool TeDatabase::loadPointSet | ( | const string & | table,
|  | TeBox & | box,
|  | TePointSet & | ps
| ) |  | `[virtual]`

TeDatabasePortal * TeDatabase::loadPointSet | ( | const string & | table,
|  | TeBox & | box
| ) |  | `[virtual]`

bool TeDatabase::loadPointSet | ( | const string & | table,
|  | const string & | geoid,
|  | TePointSet & | ps
| ) |  | `[virtual]`

bool TeDatabase::loadPointSet | ( | TeTheme * | theme,
|  | TePointSet & | ps
| ) |  | `[virtual]`

bool TeDatabase::loadPolygonSet | ( | TeTheme * | theme,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Returns all polygons that represents objects of a particular theme.

Reimplemented in TeOracleSpatial, and TePostGIS.

Examples:
  databaseQuery.cpp.

bool TeDatabase::loadPolygonSet | ( | const string & | table,
|  | TeBox & | box,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Returns all polygons inside a given box.

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

TeDatabasePortal * TeDatabase::loadPolygonSet | ( | const string & | table,
|  | TeBox & | box
| ) |  | `[virtual]`

Returns a database portal to iterate over the polygons that are inside a given box.

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::loadPolygonSet | ( | const string & | table,
|  | const string & | geoid,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Returns all polygons that represents objects of a particular geoid.

Reimplemented in TeOracleSpatial, and TePostGIS.

bool TeDatabase::loadProject | ( | TeProject * | project | ) | `[virtual]`

Load information about a particular project.

TeProjection * TeDatabase::loadProjection | ( | int | id | ) | `[virtual]`

Retrieves information about a geographical projection identified by its database id.

TeProjection * TeDatabase::loadProjectionFromSRSId | ( | int | srsid | ) | `[virtual]`

Retrieves information about a geographical projection identified by its srs id.

bool TeDatabase::loadProjectSet | ( |  | ) | `[virtual]`

Load information about all projects stored in the database.

bool TeDatabase::loadRasterLUT | ( | TeRasterParams * | par | ) | `[virtual]`

Loads a look up table associated to a raster and fills its parameters.

bool TeDatabase::loadTable | ( | const string & | tableName,
|  | TeTable & | table
| ) |  | `[virtual]`

Retrieves a table and its contents from the database.

bool TeDatabase::loadTableInfo | ( | TeTable & | table | ) | `[virtual]`

Retrieves the metainformation about an attribute table.

bool TeDatabase::loadTextSet | ( | const string & | table,
|  | const string & | geoid,
|  | TeTextSet & | ts
| ) |  | `[virtual]`

bool TeDatabase::loadTheme | ( | TeAbstractTheme * | theme,
|  | const bool & | loadAttrList = `true`,
|  | const string & | visualClass = `"tevisual"`
| ) |  | `[virtual]`

Loads a theme from the database.

Examples:
  querierFromTheme.cpp, querierGroupChronon.cpp, querierGroupElement.cpp, querierGroupSpatialRest.cpp, querierWithSpatialRestBox.cpp, querierWithSpatialRestGeometry.cpp, and themeGrouping.cpp.

bool TeDatabase::loadThemes | ( | std::vector< TeAbstractTheme * > & | vecThemes,
|  | const bool & | loadAttrList,
|  | const std::string & | userName,
|  | const bool & | loadMetadata = `true`,
|  | const string & | visualType = `"tevisual"`
| ) |  | `[virtual]`

Loads several themes from the database. Created for otimization.

bool TeDatabase::loadThemeTable | ( | TeTheme * | theme,
|  | const bool & | loadAttrList = `true`
| ) |  | `[virtual]`

Loads all attribute tables of a theme.

bool TeDatabase::loadVersionStamp | ( | string & | version | ) | `[virtual]`

Read and returns the terralib version from the database.

bool TeDatabase::loadView | ( | TeView * | view,
|  | const bool & | loadAttrList = `true`,
|  | const string & | visualClass = `"tevisual"`
| ) |  | `[virtual]`

Load a view.

bool TeDatabase::loadViewSet | ( | const string & | user,
|  | const bool & | loadAttrList = `true`,
|  | const string & | visualClass = `"tevisual"`
| ) |  | `[virtual]`

Loads a set of views belonging to a user.

TeViewTree * TeDatabase::loadViewTree | ( | TeView * | view,
|  | int | id,
|  | const bool & | loadAttrList = `true`,
|  | const string & | visualClass = `"tevisual"`
| ) |  | `[virtual]`

Recursive load view tree.

bool TeDatabase::locateCell | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TeCell & | c,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::locateLine | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TeLine2D & | line,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

Reimplemented in TeSqlServerSpatial, TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::locateLineSet | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TeLineSet & | ls,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

Reimplemented in TeSqlServerSpatial.

bool TeDatabase::locatePoint | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TePoint & | point,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

Reimplemented in TeSqlServerSpatial, TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::locatePointSet | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TePointSet & | pointSet,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

bool TeDatabase::locatePolygon | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TePolygon & | polygon,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

Returns the first polygon that contais a given coordinate.

Reimplemented in TeSqlServerSpatial, TeOracleSpatial, TePostGIS, and TePostgreSQL.

Examples:
  databaseQuery.cpp.

bool TeDatabase::locatePolygonSet | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | double | tol,
|  | TePolygonSet & | polygons
| ) |  | `[virtual]`

Returns the polygons that contains a give coordinate.

Reimplemented in TeSqlServerSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::locateText | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TeText & | text,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

bool TeDatabase::locateTextSet | ( | const string & | table,
|  | TeCoord2D & | pt,
|  | TeTextSet & | textSet,
|  | const double & | tol = `0.0`
| ) |  | `[virtual]`

map<int, map<string, string> >& TeDatabase::mapThemeAlias | ( |  | ) | `[inline]`

Returns the container of legend title alias.

bool TeDatabase::mask | ( | const string & | rasterTable,
|  | const string & | actGeomTable,
|  | const string & | objId,
|  | const string & | nameLayerOut,
|  | TeStrategicIterator | st
| ) |  | `[virtual]`

Clips a raster data from a geometry of a geometric table (actGeomTable)

Parameters:

  rasterTable | raster table name
  actGeomTable | geometric table name that contains polygons
  objId | identifier of the geometry of the actGeomTable table
  nameLayerOut | the layer name that will contain the result
  st | the strategy used in the clipping of the raster data

bool TeDatabase::mask | ( | const string & | rasterTable,
|  | TePolygon & | poly,
|  | const string & | nameLayerOut,
|  | TeStrategicIterator | st
| ) |  | `[virtual]`

Clips a raster data from a geometry in memory (poly)

Parameters:

  rasterTable | raster table name
  poly | a geometry in memory
  nameLayerOut | the layer name that will contain the result
  st | the strategy used in the clipping of the raster data

bool TeDatabase::nearestNeighbors | ( | const string & | actGeomTable,
|  | const string & | actCollTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | TeDatabasePortal * | portal,
|  | int | numRes = `1`
| ) |  | `[virtual]`

Returns the nearest neighbors of a specific geometry of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actCollTable | collection table name associated with the actGeomTable table
  actRep | geometric representation of the geometric table
  objId1 | identifier of the geometry of the actGeomTable table
  portal | a pointer to a database portal that will contain the identifiers of the nearest neighbors
  numRes | the number of nearest neighbors that will be returned

Reimplemented in TeOracleSpatial.

bool TeDatabase::nearestNeighbors | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | const string & | visCollTable,
|  | TeGeomRep | visRep,
|  | TeKeys & | visIdsOut,
|  | int | numRes = `1`
| ) |  | `[virtual]`

Returns the nearest neighbors of a geometric table (visGeomTable) of a specific geometry of other geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of the geometry of the actGeomTable table
  visGeomTable | geometric table name
  visCollTable | collection table name associated with the visGeomTable table
  visRep | geometric representation of the visGeomTable table
  visIdsOut | structure that will contain the identifiers of the nearest neighbors
  numRes | the number of nearest neighbors that will be returned

Reimplemented in TeOracleSpatial.

bool TeDatabase::nearestNeighbors | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | const string & | visGeomTable,
|  | const string & | visCollTable,
|  | TeGeomRep | visRep,
|  | TeDatabasePortal * | portal,
|  | int | numRes = `1`
| ) |  | `[virtual]`

Returns the nearest neighbors of a geometric table (visGeomTable) of a specific geometry of other geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  objId1 | identifier of the geometry of the actGeomTable table
  visGeomTable | geometric table name
  visCollTable | collection table name associated with the visGeomTable table
  visRep | geometric representation of the visGeomTable table
  portal | a pointer to a database portal that will contain the identifiers of the nearest neighbors
  numRes | the number of nearest neighbors that will be returned

Reimplemented in TeOracleSpatial.

bool TeDatabase::nearestNeighbors | ( | const string & | actGeomTable,
|  | const string & | actCollTable,
|  | TeGeomRep | actRep,
|  | const string & | objId1,
|  | TeKeys & | actIdsOut,
|  | int | numRes = `1`
| ) |  | `[virtual]`

Returns the nearest neighbors of a specific geometry of a geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actCollTable | collection table name associated with the actGeomTable table
  actRep | geometric representation of the geometric table
  objId1 | identifier of the geometry of the actGeomTable table
  actIdsOut | structure that will contain the identifiers of the nearest neighbors
  numRes | the number of nearest neighbors that will be returned

Reimplemented in TeOracleSpatial.

virtual bool TeDatabase::newDatabase | ( | const string & | database,
|  | const string & | user,
|  | const string & | password,
|  | const string & | host,
|  | const int & | port = `-1`,
|  | bool | terralibModel = `true`,
|  | const std::string & | characterSet = `""`
| ) |  | `[pure virtual]`

Creates a new database and open a connection to it.

Implemented in TeAdo, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostGIS, TePostgreSQL, and TeSQLite.

Examples:
  createDatabase.cpp.

TeDatabase & TeDatabase::operator= | ( | const TeDatabase & | other | ) | `[virtual]`

Assignment operator.

virtual bool TeDatabase::operator== | ( | const TeDatabase & | other | ) | const`[inline, virtual]`

Operator ==.

string TeDatabase::password | ( |  | ) | `[inline]`

Returns the user's password of the connection opened.

void TeDatabase::populateDatumTable | ( |  | ) | `[virtual]`

Populates the datum table with a set of pre-defined datums.

int TeDatabase::portNumber | ( |  | ) | `[inline]`

Returns the port number of the connection opened.

bool TeDatabase::projectExist | ( | const string & | projectName | ) | `[virtual]`

Check whether a given project already exists in the database (it is not case sensitive).

TeProjectMap& TeDatabase::projectMap | ( |  | ) | `[inline]`

Returns the map of projects in the database.

multiset<int>& TeDatabase::relationMSet | ( |  | ) | `[inline]`

Returns the set of relations between tables.

bool TeDatabase::removeGeometry | ( | const string & | tableName,
|  | const TeGeomRep & | rep,
|  | const int & | geomId
| ) |  | `[virtual]`

Removes a geometry from the given tableName.

Reimplemented in TeOracleSpatial, and TePostGIS.

bool TeDatabase::removeThemeTable | ( | TeTheme * | theme,
|  | int | tableOrder
| ) |  |

Removes a table from the theme.

bool TeDatabase::rollbackTransaction | ( |  | ) | `[virtual]`

Rollbacks a transaction.

Reimplemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::selectCellSet | ( | const int & | layerId,
|  | const string & | table,
|  | const string & | criteria,
|  | TeCellSet & | cs
| ) |  | `[virtual]`

bool TeDatabase::selectLineSet | ( | const string & | table,
|  | const string & | criteria,
|  | TeLineSet & | ls
| ) |  | `[virtual]`

bool TeDatabase::selectPointSet | ( | const string & | table,
|  | const string & | criteria,
|  | TePointSet & | ps
| ) |  | `[virtual]`

bool TeDatabase::selectPolygonSet | ( | const string & | table,
|  | const string & | criteria,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Returns all polygons in a table given a criteria expressed as an SQL where statement.

Reimplemented in TeOracleSpatial, and TePostGIS.

bool TeDatabase::selectTable | ( | const string & | tableName,
|  | const string & | criteria,
|  | TeTable & | table
| ) |  | `[virtual]`

Retrieves a table (or part of it) accordingly to a criteria written in SQL.

bool TeDatabase::selectTextSet | ( | const string & | table,
|  | const string & | criteria,
|  | TeTextSet & | ts
| ) |  | `[virtual]`

virtual bool TeDatabase::setClientEncoding | ( | const std::string & |  | ) | `[inline, virtual]`

Sets the client encoding.

Reimplemented in TeMySQL, and TePostgreSQL.

void TeDatabase::setConnection | ( | TeConnection * | c | ) | `[virtual]`

Sets a connection that will be used by database.

Reimplemented in TeFirebird, and TePostgreSQL.

virtual bool TeDatabase::showDatabases | ( | const string & | ,
|  | const string & | ,
|  | const string & | ,
|  | vector< string > & | ,
|  | int | = `-1`
| ) |  | `[inline, virtual]`

Show the server databases (only for MySQL, Oracle and PostgreSQL)

Reimplemented in TeFirebird, TeMySQL, TePostGIS, and TePostgreSQL.

bool TeDatabase::spatialRelation | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIdsIn,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | TeDatabasePortal * | portal,
|  | int | relate,
|  | const string & | visCollTable = `""`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (visGeomTable) that have a specific spatial relation (relate) with a subset of geometries of other geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  actIdsIn | identifiers of a geometry subset of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  portal | a pointer to a database portal that will contain the resulted geometries
  relate | spatial relation
  visCollTable | collection table name associated with the visGeomTable table

Reimplemented in TeOracleSpatial.

bool TeDatabase::spatialRelation | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIdsIn,
|  | const string & | visGeomTable,
|  | TeGeomRep | visRep,
|  | TeKeys & | visIdsOut,
|  | int | relate,
|  | const string & | visCollTable = `""`,
|  | TeDatabase * | dbVis = `0`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (visGeomTable) that have a specific spatial relation (relate) with a subset of geometries of other geometric table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  actIdsIn | identifiers of a geometry subset of the actGeomTable table
  visGeomTable | geometric table name
  visRep | geometric representation of the visGeomTable table
  visIdsOut | structure that will contain the identifiers of the resulted geometries
  relate | spatial relation
  visCollTable | collection table name associated with the visGeomTable table

bool TeDatabase::spatialRelation | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeGeometry * | geom,
|  | TeKeys & | actIdsOut,
|  | int | relate,
|  | const string & | actCollTable = `""`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a geometry in memory (geom)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  geom | a pointer to a geometry in memory
  actIdsOut | structure that will contain the identifiers of the resulted geometries
  relate | spatial relation
  actCollTable | collection table name associated with the actGeomTable table

Reimplemented in TeOracleSpatial.

bool TeDatabase::spatialRelation | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeGeometry * | geom,
|  | TeDatabasePortal * | portal,
|  | int | relate,
|  | const string & | actCollTable = `""`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a geometry in memory (geom)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  geom | a pointer to a geometry in memory
  portal | a pointer to a database portal that will contain the resulted geometries
  relate | spatial relation
  actCollTable | collection table name associated with the actGeomTable table

Reimplemented in TeOracleSpatial.

bool TeDatabase::spatialRelation | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIdsIn,
|  | TeKeys & | actIdsOut,
|  | int | relate,
|  | const string & | actCollTable = `""`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a subset of geometries of this table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  actIdsIn | identifiers of a geometry subset of the actGeomTable table
  actIdsOut | structure that will contain the identifiers of the resulted geometries
  relate | spatial relation
  actCollTable | collection table name

Reimplemented in TeOracleSpatial.

bool TeDatabase::spatialRelation | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | TeKeys & | actIdsIn,
|  | TeDatabasePortal * | portal,
|  | int | relate,
|  | const string & | actCollTable = `""`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a subset of geometries of this table (actGeomTable)

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the geometric table
  actIdsIn | identifiers of a geometry subset of the actGeomTable table
  portal | a pointer to a database portal that will contain the resulted geometries
  relate | spatial relation
  actCollTable | collection table name

Reimplemented in TeOracleSpatial.

Examples:
  spatialQuery.cpp, and spatialQueryAndBuffer.cpp.

virtual bool TeDatabase::tableExist | ( | const string & | table | ) | `[pure virtual]`

Verifies if a table exist in the database.

Implemented in TeAdo, TeOracle, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

Examples:
  addGeomRepresentation.cpp, createTable.cpp, and importDBF.cpp.

bool TeDatabase::themeExist | ( | string | themeName | ) | `[virtual]`

Check whether a given theme already exists in the database.

bool TeDatabase::themeExist | ( | const std::string & | viewName,
|  | const std::string & | userName,
|  | const std::string & | themeName
| ) |  | `[virtual]`

Check whether a given theme from a specific view already exists in the database.

TeThemeMap& TeDatabase::themeMap | ( |  | ) | `[inline]`

Returns the map of themes in the database.

virtual string TeDatabase::toUpper | ( | const string & | value | ) | `[pure virtual]`

Returns the SQL function for upper case.

Implemented in TeAdo, TeSqlServer, TeFirebird, TeMySQL, TeOCIOracle, TePostgreSQL, and TeSQLite.

bool TeDatabase::updateArc | ( | const string & | table,
|  | TeArc & | arc
| ) |  | `[virtual]`

Updates an arc geometry in the database.

bool TeDatabase::updateArcSet | ( | const string & | table,
|  | TeArcSet & | as
| ) |  | `[virtual]`

Updates arc set geometry in the database.

bool TeDatabase::updateBBox | ( | const string & | tableName,
|  | const string & | keyColumnName,
|  | int | keyValue,
|  | const TeBox & | box
| ) |  | `[virtual]`

Update box information in a table that has a set of columns to store a box value.

Reimplemented in TeAdo, and TeOracle.

bool TeDatabase::updateCell | ( | const string & | table,
|  | TeCell & | c
| ) |  | `[virtual]`

Reimplemented in TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::updateCellSet | ( | const string & | table,
|  | TeCellSet & | cs
| ) |  | `[virtual]`

bool TeDatabase::updateDatum | ( | const TeDatum & | datum | ) | `[virtual]`

Updates information about a datum.

bool TeDatabase::updateGrouping | ( | int | themeId,
|  | const TeGrouping & | grouping
| ) |  | `[virtual]`

Updates information about a grouping used in a theme.

bool TeDatabase::updateLayer | ( | TeLayer * | layer | ) | `[virtual]`

Update information about a layer.

Reimplemented in TeAdo, TeOracle, and TeFirebird.

bool TeDatabase::updateLayerBox | ( | TeLayer * | layer | ) | `[virtual]`

Updates the box information of a layer in the corresponding metadata table.

Reimplemented in TeAdo, TeOracle, and TeFirebird.

bool TeDatabase::updateLegend | ( | vector< TeLegendEntry > & | legVec | ) | `[virtual]`

bool TeDatabase::updateLegend | ( | TeLegendEntry * | legend | ) | `[virtual]`

Updates legend entries in the database.

virtual bool TeDatabase::updateLine | ( | const string & | table,
|  | TeLine2D & | l
| ) |  | `[pure virtual]`

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::updateLineSet | ( | const string & | table,
|  | TeLineSet & | ls
| ) |  | `[virtual]`

bool TeDatabase::updateNode | ( | const string & | table,
|  | TeNode & | node
| ) |  | `[virtual]`

Reimplemented in TeAdo, TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::updateNodeSet | ( | const string & | table,
|  | TeNodeSet & | ns
| ) |  | `[virtual]`

bool TeDatabase::updatePoint | ( | const string & | table,
|  | TePoint & | p
| ) |  | `[virtual]`

Reimplemented in TeAdo, TeOracleSpatial, TePostGIS, and TePostgreSQL.

bool TeDatabase::updatePointSet | ( | const string & | table,
|  | TePointSet & | ps
| ) |  | `[virtual]`

virtual bool TeDatabase::updatePolygon | ( | const string & | table,
|  | TePolygon & | p
| ) |  | `[pure virtual]`

Updates a polygon in a geometry table.

Implemented in TeAdo, TeFirebird, TeMySQL, TeOCIOracle, TeOracleSpatial, TePostGIS, TePostgreSQL, and TeSQLite.

bool TeDatabase::updatePolygonSet | ( | const string & | table,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Updates a polygon set in a geometry table.

bool TeDatabase::updateProject | ( | TeProject * | project | ) | `[virtual]`

Update information about a project.

Update information about a layer.

bool TeDatabase::updateProjection | ( | TeProjection * | proj | ) | `[virtual]`

Updates information about a geographical projection.

Reimplemented in TeFirebird.

bool TeDatabase::updateRasterMetadata | ( | const string & | tableName,
|  | int | geomId,
|  | TeRasterParams & | par
| ) |  | `[virtual]`

Updates metadata information about a particular raster geometry.

Parameters:

  tableName | name of the table that stores the metadata
  geomId | geometry unique database identification
  par | raster parameters

bool TeDatabase::updateRasterRepresentation | ( | int | layerId,
|  | TeRasterParams & | par,
|  | const string & | objectId = `""`
| ) |  | `[virtual]`

Updates the information about the raster geometry associated to an object of a layer.

Parameters:

  layerId | layer unique database identification
  par | raster parameters
  objectId | identification of the object associated to the raster geometry

Reimplemented in TeFirebird.

bool TeDatabase::updateRepresentation | ( | int | layerId,
|  | TeRepresentation & | rep
| ) |  | `[virtual]`

Updates information about a geometrical representation.

Reimplemented in TeFirebird.

bool TeDatabase::updateSRSId | ( | TeProjection * | proj,
|  | int | srsId
| ) |  | `[virtual]`

Updates information about a geographical projection SRS id.

bool TeDatabase::updateTable | ( | TeTable & | table | ) | `[virtual]`

Updates a table and its contents in the database.

Reimplemented in TeFirebird, TeMySQL, TeOCIOracle, and TePostgreSQL.

bool TeDatabase::updateTableInfo | ( | int | layerId,
|  | TeTable & | table,
|  | const string | user = `""`
| ) |  | `[virtual]`

Updates information about an attribute table.

bool TeDatabase::updateText | ( | const string & | table,
|  | TeText & | t
| ) |  | `[virtual]`

bool TeDatabase::updateTextSet | ( | const string & | table,
|  | TeTextSet & | ts
| ) |  | `[virtual]`

bool TeDatabase::updateTheme | ( | TeAbstractTheme * | theme | ) | `[virtual]`

Updates an asbtract theme in the database.

Reimplemented in TeFirebird.

bool TeDatabase::updateThemeTable | ( | TeTheme * | theme | ) | `[virtual]`

Updates information about the tables used by a theme.

bool TeDatabase::updateVersionStamp | ( | const string & | version | ) | `[virtual]`

Write the given version as the terralib version in the database.

bool TeDatabase::updateView | ( | TeView * | view | ) | `[virtual]`

Updates a view.

bool TeDatabase::updateViewTree | ( | TeViewTree * | tree | ) | `[virtual]`

Recusive updating of a view tree.

bool TeDatabase::updateVisual | ( | vector< TeLegendEntry > & | legVec | ) | `[virtual]`

bool TeDatabase::updateVisual | ( | TeLegendEntry * | legend | ) | `[virtual]`

string TeDatabase::user | ( |  | ) | `[inline]`

Return the user name of the connection opened.

void TeDatabase::user | ( | string | value | ) | `[inline]`

Set the current user name to view.

bool TeDatabase::validTable | ( | TeTable & | table | ) | `[virtual]`

Verifies and modifies the column names of the table. It returns if the table was modified.

bool TeDatabase::viewExist | ( | string | viewName | ) | `[virtual]`

Check whether a given view already exists in the database.

Examples:
  createTheme.cpp.

TeViewMap& TeDatabase::viewMap | ( |  | ) | `[inline]`

Returns the map of views in the database.

bool TeDatabase::withinDistance | ( | const string & | actGeomTable,
|  | TeGeomRep | actRep,
|  | const TeCoord2D & | point,
|  | TeKeysToDist & | IdsDistOut,
|  | const double & | max_distance,
|  | const string & | actCollTable = `""`
| ) |  | `[virtual]`

Returns the geometries of a geometric table (actGeomTable) that are within a specific distance from a point in memory.

Parameters:

  actGeomTable | geometric table name
  actRep | geometric representation of the actGeomTable table
  point | a point in memory
  IdsDistOut | structure that will contain the identifiers of the resulted geometries and their distances
  max_distance | maximum distance
  actCollTable | collection table name associated with the actGeomTable table

bool TeDatabase::zonal | ( | const string & | rasterTable,
|  | TePolygon & | poly,
|  | TeStatisticsDimensionVect & | result,
|  | const bool & | useDummy = `true`
| ) |  | `[virtual]`

Returns the statistics of a raster data region inside a geometry in memory.

Parameters:

  rasterTable | raster table name
  poly | the geometry in memory that define a region in the raster data
  result | structure that will contain the resulted statistics

bool TeDatabase::zonal | ( | const string & | rasterTable,
|  | const string & | actGeomTable,
|  | const string & | actCollTable,
|  | TeObjectStatistics & | result,
|  | const bool & | useDummy = `true`
| ) |  | `[virtual]`

Returns the statistics of raster data regions inside a geometry set of a geometric table (actGeomTable)

Parameters:

  rasterTable | raster table name
  actGeomTable | geometric table name that contains polygons
  actCollTable | collection table that contains the identifiers of the geometries of the actGeomTable table that define the regions in the raster data
  result | structure that will contain the resulted statistics

bool TeDatabase::zonal | ( | const string & | rasterTable,
|  | const string & | actGeomTable,
|  | TeKeys & | Ids,
|  | TeObjectStatistics & | result,
|  | const bool & | useDummy = `true`
| ) |  | `[virtual]`

Returns the statistics of raster data regions inside a geometry set of a geometric table (actGeomTable)

Parameters:

  rasterTable | raster table name
  actGeomTable | geometric table name that contains polygons
  Ids | identifiers of the geometries of the actGeomTable table that define the regions in the raster data
  result | structure that will contain the resulted statistics

## Member Data Documentation

std::string TeDatabase::database_`[protected]`

database name

std::string TeDatabase::dbmsName_`[protected]`

DBMS name (Ado, MySQL, Postgres, OracleSpatial)

std::string TeDatabase::errorMessage_`[protected]`

error message

int TeDatabase::errorNumber_`[protected]`

error number

std::string TeDatabase::host_`[protected]`

host name of the database server

bool TeDatabase::isConnected_`[protected]`

indicates if the connection is open

TeSharedPtr<TeMetaModelCache> TeDatabase::metaModel_`[protected]`

Meta model: Layers, Themes, Views...

std::string TeDatabase::password_`[protected]`

user password

int TeDatabase::portNumber_`[protected]`

port number

int TeDatabase::transactionCounter_`[protected]`

counts how many nested transactions have been opened

Reimplemented in TePostgreSQL.

std::string TeDatabase::user_`[protected]`

user name

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines