![]() |
TerraLib 4.1
|
#include "TeApplicationUtils.h"#include "../../kernel/TeSlice.h"#include "../../kernel/TeDatabase.h"#include "../../utils/TeDatabaseUtils.h"#include "../../utils/TeColorUtils.h"#include "../../stat/TeKernelParams.h"#include "../../kernel/TeExternalTheme.h"#include <errno.h>Functions | |
| void | TeGroupByUniqueValue (vector< string > &vec, TeAttrDataType tipo, vector< TeSlice > &result, int precision) |
| bool | createAppThemeTable (TeDatabase *db, bool integrity, const string &tableName) |
| bool | populateAppThemeTable (TeDatabase *db, const string &tableName) |
| bool | deleteAppTheme (TeDatabase *db, TeAbstractTheme *theme, const string &tableName) |
| bool | createMediaTable (TeDatabase *db, const string &tname) |
| bool | createLayerMediaTable (TeDatabase *db, int layerId, const string &tname) |
| bool | insertMedia (TeDatabase *db, const string &tableName, string &fileName, const string &description, const string &type, bool blob) |
| bool | insertMediaObjLayer (TeDatabase *db, TeLayer *layer, const string &objectId, const string &mediaName, const string &mediaTable) |
| bool | setDefaultMedia (TeDatabase *db, TeLayer *layer, const string &objectId, const string &mediaName, const string &mediaTable) |
| bool | updateMediaDescription (TeDatabase *db, const string &mediaName, const string &mediaTable, const string &desc) |
| bool | insertInfo2Blob (TeDatabase *db, int layerId, const string &tableName, const string &fileName, const string &type) |
| Inserts a new general information of a layer or database. | |
| string | getInfoBlob2TemporaryFile (TeDatabase *db, int layerId, const string &tableName, string &type) |
| read blob and copy to temporary file | |
| bool | createChartParamsTable (TeDatabase *db, bool integrity) |
| bool | updateGridColor (TeDatabase *db, int themeId, TeObjectSelectionMode sel, TeColor &color) |
| bool | createKernelMetadataTable (TeDatabase *db) |
| bool | insertKernelMetadata (TeDatabase *db, TeKernelParams &kernelPar) |
| bool | updateKernelMetadata (TeDatabase *db, TeKernelParams &kernelPar) |
| bool | loadKernelParams (TeDatabase *db, int supThemeId, const string &supTableName, const string &supAttrName, TeKernelParams &KernelPar) |
| bool | loadKernelParams (TeDatabase *db, int layerId, TeKernelParams &KernelPar) |
| int | createTeLayerMetadata (TeDatabase *db) |
| int | createTeTableMetadata (TeDatabase *db) |
| bool | deleteTextVisual (TeLayer *layer) |
| string | deletePointedObjects (TeTheme *theme, TeBox &box) |
| string | insertObjectIntoCollection (TeTheme *theme, TeCoord2D p, string newId, string newTId) |
| bool | createGPMMetadataTable (TeDatabase *db, const bool &integrity) |
| bool | createNeighbourhoodTable (TeDatabase *db, const string &tableName) |
| bool | deleteGPMTable (TeDatabase *db, const int &themeId, const int &gpmId) |
| Delete the generalized proximity matrix of a theme - neighbourhoodTable and metadata. | |
| bool | loadAppTheme (TeDatabase *db, TeAppTheme *theme, const string &tableName) |
| bool | insertAppTheme (TeDatabase *db, TeAppTheme *appTheme, const string &tableName) |
| bool | updateAppTheme (TeDatabase *db, TeAppTheme *appTheme, const string &tableName) |
| bool | insertChartParams (TeDatabase *db, TeAppTheme *theme) |
| bool | deleteChartParams (TeDatabase *db, TeAppTheme *theme) |
| bool | locatePieBar (TeDatabase *db, TeAppTheme *theme, TeCoord2D pt, double delta) |
| bool | loadChartParams (TeDatabase *db, TeAppTheme *theme) |
| bool | updatePieBarLocation (TeDatabase *db, TeAppTheme *theme, TeCoord2D pt) |
| bool | updatePointLocation (TeDatabase *db, TeAppTheme *theme, TeCoord2D pt) |
| bool | generateCountLegends (TeAppTheme *appTheme, string table, string field) |
| generate Count legends | |
| void | changeObjectStatus (ObjectInfo &info, string &uniqueId, string mode, int pointed) |
| bool | saveObjectStatus (TeAppTheme *appTheme, set< string > &objectSet, map< string, ObjectInfo > &objectMap) |
| TeStatisticType | getStatisticFromString (const string &s) |
| void | getVisual (TeAppTheme *appTheme, TeGeomRep geomRep, map< string, TeVisual > &objVisualMap, set< string > &oidSet, bool allObjects) |
| template<> | |
| TeCoord2D | calculateLabelPosition (const TePolygonSet &geomSet) |
| bool | getMiddleLine (TeLine2D line, TeCoord2D &p) |
| template<> | |
| TeCoord2D | calculateLabelPosition (const TeLine2D &geomSet) |
| bool | saveCentroidLabel (TeDatabase *db, const TePolygonSet &polys, const std::string &collTable) |
| bool | getNextObject (TeDatabasePortal *portal, TePolygonSet &polys, TePolygon &nextPoly) |
| bool | generateTextUsingCentroid (TeTheme *theme, const std::string &objectId) |
| This function generates the position of text labels. | |
| TeCoord2D calculateLabelPosition | ( | const TePolygonSet & | geomSet | ) |
| void changeObjectStatus | ( | ObjectInfo & | info, |
| string & | uniqueId, | ||
| string | mode, | ||
| int | pointed | ||
| ) |
| bool deleteChartParams | ( | TeDatabase * | db, |
| TeAppTheme * | theme | ||
| ) |
Deletes the chart parameters of a theme in the database
| db | pointer do a TerraLib database |
| theme | pointer to a theme as defined by TerraView |
Delete the objects of a layer that are pointed in a theme
| theme | pointer to the extended theme were the objects are pointed |
| box | to return the bounding box that contains the objects that were deleted |
| bool deleteTextVisual | ( | TeLayer * | layer | ) |
Removes tables that contains the visual of texts associated to a layer
| layer | pointer do a TerraLib layer |
| bool generateCountLegends | ( | TeAppTheme * | appTheme, |
| string | table, | ||
| string | field | ||
| ) |
generate Count legends
| bool generateTextUsingCentroid | ( | TeTheme * | theme, |
| const std::string & | objectId = "" |
||
| ) |
This function generates the position of text labels.
It calculates the label position using the center of geometry box. This coordinate is calculated as follows:
| theme | The theme to generate labels positions. |
| objectId | Object identifier. This parameter is used, if the label position must be generated for a particular object. |
| bool getNextObject | ( | TeDatabasePortal * | portal, |
| TePolygonSet & | polys, | ||
| TePolygon & | nextPoly | ||
| ) |
| TeStatisticType getStatisticFromString | ( | const string & | s | ) |
| void getVisual | ( | TeAppTheme * | appTheme, |
| TeGeomRep | geomRep, | ||
| map< string, TeVisual > & | objVisualMap, | ||
| set< string > & | oidSet, | ||
| bool | allObjects | ||
| ) |
| bool insertAppTheme | ( | TeDatabase * | db, |
| TeAppTheme * | theme, | ||
| const string & | tableName = "te_theme_application" |
||
| ) |
Saves the parameters of an extended theme
| db | a pointer to a TerraLib database |
| theme | pointer to an instance of an extended theme |
| tableName | name of the table that persists the extended theme |
| bool insertChartParams | ( | TeDatabase * | db, |
| TeAppTheme * | theme | ||
| ) |
Saves in the database the color parameters associated to a theme
| db | pointer do a TerraLib database |
| theme | pointer to a theme as defined by TerraView |
| string insertObjectIntoCollection | ( | TeTheme * | theme, |
| TeCoord2D | p, | ||
| string | newId, | ||
| string | newTId = "" |
||
| ) |
Inserts a new object into a theme
| theme | pointer to a theme (the object is already in the layer) |
| p | labels position location |
| newId | the identifier of the object |
| newTId | the identifier of the instance of the object (for temporal objects) |
| bool loadAppTheme | ( | TeDatabase * | db, |
| TeAppTheme * | theme, | ||
| const string & | tableName = "te_theme_application" |
||
| ) |
Loads the parameters of an extended theme
| db | a pointer to a TerraLib database |
| theme | pointer to an instance of an extended theme |
| tableName | name of the table that persists the extended theme |
| bool loadChartParams | ( | TeDatabase * | db, |
| TeAppTheme * | theme | ||
| ) |
Loads the charts parameters associated to a theme
| db | pointer do a TerraLib database |
| theme | pointer to a theme as defined by TerraView |
| bool locatePieBar | ( | TeDatabase * | db, |
| TeAppTheme * | theme, | ||
| TeCoord2D | pt, | ||
| double | delta | ||
| ) |
Verifies if there is a pie/bar char around a given location, for a given theme and select it
| db | pointer do a TerraLib database |
| theme | pointer to a theme as defined by TerraView |
| pt | a location |
| delta | a tolerance around the location |
| bool saveCentroidLabel | ( | TeDatabase * | db, |
| const TePolygonSet & | polys, | ||
| const std::string & | collTable | ||
| ) |
| bool saveObjectStatus | ( | TeAppTheme * | appTheme, |
| set< string > & | objectSet, | ||
| map< string, ObjectInfo > & | objectMap | ||
| ) |
| void TeGroupByUniqueValue | ( | vector< string > & | vec, |
| TeAttrDataType | tipo, | ||
| vector< TeSlice > & | result, | ||
| int | precision | ||
| ) |
| bool updateAppTheme | ( | TeDatabase * | db, |
| TeAppTheme * | theme, | ||
| const string & | tableName = "te_theme_application" |
||
| ) |
Updates the parameters of an extended theme
| db | a pointer to a TerraLib database |
| theme | pointer to an instance of an extended theme |
| tableName | name of the table that persists the extended theme |
| bool updatePieBarLocation | ( | TeDatabase * | db, |
| TeAppTheme * | theme, | ||
| TeCoord2D | pt | ||
| ) |
Updates the location of the selected pie/bar chart of a theme
| db | pointer do a TerraLib database |
| theme | pointer to a theme as defined by TerraView |
| pt | the new location for the chart |
| bool updatePointLocation | ( | TeDatabase * | db, |
| TeAppTheme * | theme, | ||
| TeCoord2D | pt | ||
| ) |
Updates the location of selected object of an extended theme with TePoint geometry
| db | pointer do a TerraLib database |
| theme | pointer to an extended theme |
| pt | new location of the point |