TerraLib 4.1
GeoProcessing functions

Functions

TLFUNCTIONS_DLL bool TeGeoOpAggregation (TeLayer *newLayer, TeTheme *theme, vector< string > &agregAttrVec, TeGroupingAttr &attrMM, TeSelectedObjects selOb, TeAsciiFile *logFile=0)
TLFUNCTIONS_DLL bool TeGeoOpAdd (TeLayer *newLayer, TeTheme *theme, vector< TeTheme * > themeVec, TeSelectedObjects selObj=TeAll, TeAsciiFile *logFile=0)
TLFUNCTIONS_DLL bool TeGeoOpOverlayIntersection (TeLayer *newLayer, TeTheme *theme, TeTheme *themeTrim, TeSelectedObjects selOb, TeSelectedObjects selObTrim, bool attrTrim, TeAsciiFile *logFile=0)
TLFUNCTIONS_DLL bool TeGeoOpOverlayIntersection (TeLayer *newLayer, TeTheme *theme, TeTheme *themeTrim, TeSelectedObjects selObTrim, double backValue, TeAsciiFile *logFile=0)
TLFUNCTIONS_DLL bool TeGeoOpOverlayDifference (TeLayer *newLayer, TeTheme *theme1, TeTheme *theme2, TeSelectedObjects selOb1, TeSelectedObjects selOb2, TeAsciiFile *logFile=0)
TLFUNCTIONS_DLL bool TeGeoOpAssignDataLocationDistribute (TeTheme *themeMod, TeTheme *theme, const string &tableName, const int &spatialRelation, const vector< string > &attributes=vector< string >(), TeAsciiFile *logFile=0)
TLFUNCTIONS_DLL bool TeGeoOpAssignByLocationCollect (TeTheme *restrTheme, TeTheme *srcTheme, const string &newTableName, TeGroupingAttr &measuresColl, const int &spatialRelation)
TLFUNCTIONS_DLL bool TeGeoOpBuffer (TeLayer *newLayer, TeTheme *themeIn, const TeSelectedObjects &selOb, const TeBUFFERREGION::TeBufferType &bufferType, const double &bufferDistance, const unsigned int &bufferLevels, const unsigned int &numPoints, const bool &doUnion=false, const string &tableName="", const string &attrName="", TeAsciiFile *logFile=0, const bool &copyInputColumns=true)
TLFUNCTIONS_DLL bool TeGeoOpNearestNeighbour (TeTheme *inputTheme, TeSelectedObjects iselObj, TeTheme *neighTheme, TeSelectedObjects nnselObj, const string &distColName="", const string &NNIDColName="")
 Calculates the distance to the nearest neighbour (NN) This function calculates the distance of objetcs in the input theme to the nearest object in a neighbour candidates theme. For complex geometries such as polygons, cells, lines, sets of geometries or multigeometries the NN is found based on thedistance between the centroids of the geometries (for both input and for neighbour candidates objects). If themes have different projections the distance will be computed using input theme projection.
TLFUNCTIONS_DLL bool TeGeoOpOverlayUnion (TeLayer *newLayer, TeTheme *theme, TeTheme *themeOverlay, TeSelectedObjects selOb, TeSelectedObjects selObOverlay, TeAsciiFile *logFile=0)

Detailed Description

A set of functions that execute some common operations when dealing with geographical data


Function Documentation

TLFUNCTIONS_DLL bool TeGeoOpAdd ( TeLayer newLayer,
TeTheme theme,
vector< TeTheme * >  themeVec,
TeSelectedObjects  selObj = TeAll,
TeAsciiFile logFile = 0 
)

Adds a set of themes generating a new layer

Parameters:
newLayerpointer to a valid layer already created in the database to store the result of the operation
themepointer to the first theme being added: the new layer will have the same attributes as the this theme
themeVeca vector of themes that should be added to the first one
selOba selection of the objects of the theme that should be added
logFileOptional: a pointer to a text file where error messages will be saved
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpAggregation ( TeLayer newLayer,
TeTheme theme,
vector< string > &  agregAttrVec,
TeGroupingAttr attrMM,
TeSelectedObjects  selOb,
TeAsciiFile logFile = 0 
)

Agreggates the objects of a theme generating a new layer

Parameters:
newLayerpointer to a valid layer already created in the database to store the result of the operation
themepointer to the theme being aggregated
agregAttrVecta vector with the names of the attributes that should have the same value in order to aggregate two objects.
attrMMthe definition of the attributes (with the measures over it) that should passed to the new layer
selOba selection of the objects of the theme that should be aggregated
logFileOptional: a pointer to a text file where error messages will be saved
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpAssignByLocationCollect ( TeTheme restrTheme,
TeTheme srcTheme,
const string newTableName,
TeGroupingAttr measuresColl,
const int &  spatialRelation 
)

Assign Data By Location - Collect: collects the attributes of the objects of a theme and assign it to second theme based on a spatial relation

Parameters:
restrThemepointer to theme that has the attributes that will be passed
srcThemepointer to the theme that has the attributes that will be collected
newTableNamename of the table that will store the attributes collected
measuresCollthe definition of the attributes (with the measures over it) that should passed to first theme
spatialRelationa spatial relation (or a combination of) that will be used as the criteria to pass the attributes between the themes
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpAssignDataLocationDistribute ( TeTheme themeMod,
TeTheme theme,
const string tableName,
const int &  spatialRelation,
const vector< string > &  attributes = vector< string >(),
TeAsciiFile logFile = 0 
)

Assign Data By Location - Distribute: passes the attributes of the objects of a theme to the objects of a second theme based on a spatial relation

Parameters:
themeModpointer to theme that has the attributes that will be passed
themepointer to the theme that will receive the attributes
tableNamename of the table that will store the attributes passed from the first theme
spatialRelationa spatial relation (or a combination of) that will be used as the criteria to pass the attributes between the themes
attributesa list of attributes from the first theme that should be distributes to the second theme
logFileOptional: a pointer to a text file where error messages will be saved
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpBuffer ( TeLayer newLayer,
TeTheme themeIn,
const TeSelectedObjects selOb,
const TeBUFFERREGION::TeBufferType bufferType,
const double &  bufferDistance,
const unsigned int &  bufferLevels,
const unsigned int &  numPoints,
const bool &  doUnion = false,
const string tableName = "",
const string attrName = "",
TeAsciiFile logFile = 0,
const bool &  copyInputColumns = true 
)

Generates a new layer with the buffers of the objects of a theme

Parameters:
newLayerpointer to a new layer that will receive the buffers generated
themeInpointer to a source theme that will provide the objects to generate the buffers
selObdefine which objects of the themeIn will be used
bufferTypedefine the buffer type: inside/outside/inside+outside
bufferDistancethe buffer distance in the same unit of the object geometries
bufferLevelsthe number of buffer rings
numPointsthe number of points that should be used to describe the curved corners of the buffer zone
doUniona flag to indicate if this function will dissolve barries among buffers
tableNamename of the attribute table that will provide an attribute that defines the buffer distance for each object
attrNameattribute name of the attribute table "tableName" that will provide the buffer distance for each object
logFileOptional: a pointer to a text file where error messages will be saved
copyInputColumnsIf TRUE, all the columns from the iput table will be also copied to the result layer
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpNearestNeighbour ( TeTheme inputTheme,
TeSelectedObjects  iselObj,
TeTheme neighTheme,
TeSelectedObjects  nnselObj,
const string distColName = "",
const string NNIDColName = "" 
)

Calculates the distance to the nearest neighbour (NN) This function calculates the distance of objetcs in the input theme to the nearest object in a neighbour candidates theme. For complex geometries such as polygons, cells, lines, sets of geometries or multigeometries the NN is found based on thedistance between the centroids of the geometries (for both input and for neighbour candidates objects). If themes have different projections the distance will be computed using input theme projection.

Parameters:
inputThemepointer to the theme that contains the objects to which the nearest neighbour are being searched
iselObja specific selection of the input theme
neighThemepointer to the theme that contains the candidates to NN
nnselObja specific selection of NN theme
distColNamethe name of the column that will contain the distance to the NN object. If empty, the name "DIST" will be used. If the column should be created in a specific table, use the convention "tableName.colName", otherwise the first static table will be sued. If the column exists its values will be updated, if it don't the column will be created.
NNIDColNamethe name of the column that will contain the identification of the NN object. If empty the column won't be generated.
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpOverlayDifference ( TeLayer newLayer,
TeTheme theme1,
TeTheme theme2,
TeSelectedObjects  selOb1,
TeSelectedObjects  selOb2,
TeAsciiFile logFile = 0 
)

Generates the geometrical difference between two themes (t1 - t2), generating a new layer

Parameters:
newLayerpointer to a valid layer already created in the database to store the result of the operation
theme1pointer to the first theme
theme2pointer to the second theme
selOba selection of the objects of the first theme
selOba selection of the objects of the second theme
logFileOptional: a pointer to a text file where error messages will be saved
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpOverlayIntersection ( TeLayer newLayer,
TeTheme theme,
TeTheme themeTrim,
TeSelectedObjects  selOb,
TeSelectedObjects  selObTrim,
bool  attrTrim,
TeAsciiFile logFile = 0 
)

Clips a theme generating a new layer

Parameters:
newLayerpointer to a valid layer already created in the database to store the result of the operation
themepointer to the theme being clipped
themeTrimpointer to the theme that has objects with polygon geometry that will be used as the mask for the clipping
selOba selection of the objects of the theme that should be clipped
selObTrima selection of the objects of the theme that should be used as mask
attrTrimflag to indicate that the attributes of the mask theme should be included in the new layer
logFileOptional: a pointer to a text file where error messages will be saved
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpOverlayIntersection ( TeLayer newLayer,
TeTheme theme,
TeTheme themeTrim,
TeSelectedObjects  selObTrim,
double  backValue,
TeAsciiFile logFile = 0 
)

Clips a theme generated from a layer with raster representation generating a new layer

Parameters:
newLayerpointer to a valid layer already created in the database to store the result of the operation
themepointer to the theme being clipped
themeTrimpointer to the theme that has objects with polygon geometry that will be used as the mask for the clipping
selObTrima selection of the objects of the theme that should be used as mask
backValuethe value that should be used as the background
logFileOptional: a pointer to a text file where error messages will be saved
Returns:
true if it succeed and false otherwise
TLFUNCTIONS_DLL bool TeGeoOpOverlayUnion ( TeLayer newLayer,
TeTheme theme,
TeTheme themeOverlay,
TeSelectedObjects  selOb,
TeSelectedObjects  selObOverlay,
TeAsciiFile logFile = 0 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines