TerraLib 4.1
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeSpatialOperations.h File Reference

This file contains functions to spatial operations with geographical objects that are in a SGBD. More...

#include "TeDatabase.h"
#include "TeRaster.h"

Go to the source code of this file.

Typedefs

typedef vector< TeGeometry * > TeSelectedGeom
 Keep the selected geometries in the canvas.

Functions

TL_DLL string getStringIds (TeKeys &IdsIn)
 Return a string with the identifications of the selected geometries.
TL_DLL bool TeTopologicalRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, TeDatabasePortal *portal, int relation, const string &actColTable="")
 Return a portal with the geometries of a spatial table that have a topological relation with specifics geometries of this spatial table.
TL_DLL bool TeTopologicalRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, const string &visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, int relation, const string &visColTable="")
 Return a portal with the geometries of a spatial table that have a topological relation with specifics geometries of other spatial table.
TL_DLL bool TeTopologicalRelation (const string &actGeomTable, TeGeomRep actRep, TeGeometry *geom, TeDatabasePortal *portal, int relation, const string &actCollTable="")
 Return a portal with the geometries of a spatial table that have a topological relation with a specific geometry.
TL_DLL bool TeTopologicalRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, TeKeys &actIdsOut, TeDatabase *db, int relation, const string &actCollTable="")
 Return the identications of the geometries of a spatial table that have a topological relation with specifics geometries of this spatial table.
TL_DLL bool TeTopologicalRelation (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, const string &visGeomTable, TeGeomRep visRep, TeKeys &visIdsOut, TeDatabase *db, int relation, const string &visCollTable="", TeDatabase *=0)
 Return the identications of the geometries of a spatial table that have a topological relation with specifics geometries of other spatial table.
TL_DLL bool TeTopologicalRelation (const string &actGeomTable, TeGeomRep actRep, TeGeometry *geom, TeKeys &actIdsOut, TeDatabase *db, int relation, const string &actCollTable="")
 Return the identications of the geometries of a spatial table that have a topological relation with a specific geometry.
TL_DLL bool TeTopologicalRelation (const TePolygon *geom1, const TePolygon *geom2, int relation)
 Return whether the specified topological relation holds between two polygon.
TL_DLL bool TeTopologicalRelation (const TePolygon *geom1, const TeLine2D *geom2, int relation)
 Return whether the specified topological relation holds between a polygon and a line.
TL_DLL bool TeTopologicalRelation (const TePolygon *geom1, const TePoint *geom2, int relation)
 Return whether the specified topological relation holds between a polygon and a point.
TL_DLL bool TeTopologicalRelation (const TeLine2D *geom1, const TeLine2D *geom2, int relation)
 Return whether the specified topological relation holds between two lines.
TL_DLL bool TeTopologicalRelation (const TeLine2D *geom1, const TePoint *geom2, int relation)
 Return whether the specified topological relation holds between a line and a point.
TL_DLL bool TeTopologicalRelation (const TePoint *geom1, const TePoint *geom2, int relation)
 Return whether the specified topological relation holds between two points.
TL_DLL bool TeTopologicalRelation (const TeCell *geom1, const TeCell *geom2, int relation)
 Return whether the specified topological relation holds between two cells.
TL_DLL bool TeTopologicalRelation (const TeCell *geom1, const TePolygon *geom2, int relation)
 Return whether the specified topological relation holds between a cell and a polygon.
TL_DLL bool TeTopologicalRelation (const TeCell *geom1, const TeLine2D *geom2, int relation)
 Return whether the specified topological relation holds between a cell and a line.
TL_DLL bool TeTopologicalRelation (const TeCell *geom1, const TePoint *geom2, int relation)
 Return whether the specified topological relation holds between a cell and a point.
TL_DLL bool TeGetWithinDistance (const string &actGeomTable, TeGeomRep actRep, const TeCoord2D &point, TeKeysToDist &IdsDistOut, TeDatabase *db, const double &max_dist, const string &actCollTable="")
 Returns the geometries of a geometric table (actGeomTable) that are within a specific distance from a point in memory.
TL_DLL bool TeGetArea (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, TeDatabase *db, double &area)
 Return the area of some specifics geometries of a spatial table.
TL_DLL bool TeGetLength (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIdsIn, TeDatabase *db, double &length)
 Return the length of some specifics geometries of a spatial table.
TL_DLL bool TeGetDistance (const string &actGeomTable, TeGeomRep actRep, TeKeys &IdsIn, TeDatabase *db, double &distance)
 Return the distance between two geometries.
TL_DLL bool TeGetConvexHull (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TeDatabase *db, TePolygonSet &convexHullSet)
 Return the convexhull geometries of specifics geometries of a spatial table.
TL_DLL bool TeGetCentroid (const string &actGeomTable, TeGeomRep actRep, TeDatabase *db, TePointSet &centroidSet, TeKeys &actIds, const string &actCollTable="")
 Return the centroids of specifics geometries of a spatial table.
TL_DLL bool TeGetBuffer (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TeDatabase *db, TePolygonSet &bufferSet, double dist)
 Return the buffer.
TL_DLL bool TeGetOverlay (const string &actGeomTable, TeGeomRep actRep, TeKeys &actIds, TeDatabase *db, TeGeometryVect &geomVect, const short &operation)
 Return intersection.
TL_DLL TeRasterTeMask (TeRaster *rasterIn, TePolygon &poly, TeStrategicIterator st)
 Clip a raster from a polygon. Return the clipped raster.

Detailed Description

This file contains functions to spatial operations with geographical objects that are in a SGBD.


Typedef Documentation

typedef vector<TeGeometry*> TeSelectedGeom

Keep the selected geometries in the canvas.


Function Documentation

TL_DLL string getStringIds ( TeKeys IdsIn)

Return a string with the identifications of the selected geometries.

TL_DLL bool TeGetArea ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIdsIn,
TeDatabase db,
double &  area 
)

Return the area of some specifics geometries of a spatial table.

Parameters:
actGeomTablespatial table name that contains the geometries
actRepgeometrical representation of the spatial table
actIdsInidentifications of the specifics geometries (object_id)
dba TeDatabase pointer
areaarea returned
TL_DLL bool TeGetBuffer ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIds,
TeDatabase db,
TePolygonSet bufferSet,
double  dist 
)

Return the buffer.

TL_DLL bool TeGetCentroid ( const string actGeomTable,
TeGeomRep  actRep,
TeDatabase db,
TePointSet centroidSet,
TeKeys actIds,
const string actCollTable = "" 
)

Return the centroids of specifics geometries of a spatial table.

TL_DLL bool TeGetConvexHull ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIds,
TeDatabase db,
TePolygonSet convexHullSet 
)

Return the convexhull geometries of specifics geometries of a spatial table.

Parameters:
actGeomTablespatial table name that contains the geometries
actRepgeometrical representation of the spatial table
actIdsidentifications of the specifics geometries (object_id)
dba TeDatabase pointer
convexHullSetthe convexhull geometries returned
TL_DLL bool TeGetDistance ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys IdsIn,
TeDatabase db,
double &  distance 
)

Return the distance between two geometries.

TL_DLL bool TeGetLength ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIdsIn,
TeDatabase db,
double &  length 
)

Return the length of some specifics geometries of a spatial table.

TL_DLL bool TeGetOverlay ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIds,
TeDatabase db,
TeGeometryVect geomVect,
const short &  operation 
)

Return intersection.

TL_DLL bool TeGetWithinDistance ( const string actGeomTable,
TeGeomRep  actRep,
const TeCoord2D point,
TeKeysToDist IdsDistOut,
TeDatabase db,
const double &  max_dist,
const string actCollTable = "" 
)

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

Parameters:
actGeomTablegeometric table name
actRepgeometric representation of the actGeomTable table
pointa point in memory
IdsDistOutstructure that will contain the identifiers of the resulted geometries and their distances
dba TeDatabase pointer
max_distmaximum distance
actCollTablecollection table name associated with the actGeomTable table
TL_DLL TeRaster* TeMask ( TeRaster rasterIn,
TePolygon poly,
TeStrategicIterator  st 
)

Clip a raster from a polygon. Return the clipped raster.

Parameters:
rasterInTeRaster pointer that will be clipped
polypolygon that defines the clipping
ststrategic to the iterator of the raster
TL_DLL bool TeTopologicalRelation ( const TeCell geom1,
const TePoint geom2,
int  relation 
)

Return whether the specified topological relation holds between a cell and a point.

Parameters:
geom1a cell
geom2a point
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const TeCell geom1,
const TeLine2D geom2,
int  relation 
)

Return whether the specified topological relation holds between a cell and a line.

Parameters:
geom1a cell
geom2a line
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const TeCell geom1,
const TePolygon geom2,
int  relation 
)

Return whether the specified topological relation holds between a cell and a polygon.

Parameters:
geom1a cell
geom2a polygon
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const TeCell geom1,
const TeCell geom2,
int  relation 
)

Return whether the specified topological relation holds between two cells.

Parameters:
geom1a cell
geom2another cell
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIdsIn,
const string visGeomTable,
TeGeomRep  visRep,
TeKeys visIdsOut,
TeDatabase db,
int  relation,
const string visCollTable = "",
TeDatabase = 0 
)

Return the identications of the geometries of a spatial table that have a topological relation with specifics geometries of other spatial table.

Calculate the topological relation between all geometries of a spatial table and specifics geometries of other spatial table

Parameters:
actGeomTablefirst spatial table name that contains the specifics geometries
actRepgeometrical representation of the first spatial table
actIdsInidentifications of specifics geometries of the first spatial table (object_id)
visGeomTablesecond spatial table name that contains the others geometries
visRepgeometrical representation of the second spatial table
visIdsOutreturned with the identications of the resultants geometries (object_id)
dba TeDatabase pointer
relationtopological relation that will be computed
visCollTablecollection table name that contains a set of geometries of the second spatial table
TL_DLL bool TeTopologicalRelation ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIdsIn,
const string visGeomTable,
TeGeomRep  visRep,
TeDatabasePortal portal,
int  relation,
const string visColTable = "" 
)

Return a portal with the geometries of a spatial table that have a topological relation with specifics geometries of other spatial table.

Calculate the topological relation between all geometries of a spatial table and specifics geometries of other spatial table

Parameters:
actGeomTablefirst spatial table name that contains the specifics geometries
actRepgeometrical representation of the first spatial table
actIdsInidentifications of specifics geometries of the first spatial table (object_id)
visGeomTablesecond spatial table name that contains the others geometries
visRepgeometrical representation of the second spatial table
portalreturned with the resultants geometries
relationtopological relation that will be computed
visColTablecollection table name that contains a set of geometries of the second spatial table
TL_DLL bool TeTopologicalRelation ( const TeLine2D geom1,
const TePoint geom2,
int  relation 
)

Return whether the specified topological relation holds between a line and a point.

Parameters:
geom1a line
geom2a point
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const TePoint geom1,
const TePoint geom2,
int  relation 
)

Return whether the specified topological relation holds between two points.

Parameters:
geom1a point
geom2another point
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIdsIn,
TeDatabasePortal portal,
int  relation,
const string actColTable = "" 
)

Return a portal with the geometries of a spatial table that have a topological relation with specifics geometries of this spatial table.

Calculate the topological relation between all geometries of a spatial table and specifics geometries of this spatial table

Parameters:
actGeomTablespatial table name that contains all the geometries
actRepgeometrical representation of the spatial table
actIdsInidentifications of the specifics geometries (object_id)
portalreturned with the resultants geometries
relationtopological relation that will be computed
actColTablecollection table name that contains a set of geometries of the spatial table
TL_DLL bool TeTopologicalRelation ( const TePolygon geom1,
const TePolygon geom2,
int  relation 
)

Return whether the specified topological relation holds between two polygon.

Parameters:
geom1a polygon
geom2another polygon
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const string actGeomTable,
TeGeomRep  actRep,
TeGeometry geom,
TeKeys actIdsOut,
TeDatabase db,
int  relation,
const string actCollTable = "" 
)

Return the identications of the geometries of a spatial table that have a topological relation with a specific geometry.

Calculate the topological relation between all geometries of a spatial table and a specific geometry

Parameters:
actGeomTablespatial table name that contains the geometries
actRepgeometrical representation of the spatial table
geoma specific geometry
actIdsOutreturned with the identications of the resultants geometries (object_id)
dba TeDatabase pointer
relationtopological relation that will be computed
actCollTablecollection table name that contains a set of geometries of the spatial table
TL_DLL bool TeTopologicalRelation ( const TePolygon geom1,
const TePoint geom2,
int  relation 
)

Return whether the specified topological relation holds between a polygon and a point.

Parameters:
geom1a polygon
geom2a point
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const TeLine2D geom1,
const TeLine2D geom2,
int  relation 
)

Return whether the specified topological relation holds between two lines.

Parameters:
geom1a line
geom2another line
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const string actGeomTable,
TeGeomRep  actRep,
TeKeys actIdsIn,
TeKeys actIdsOut,
TeDatabase db,
int  relation,
const string actCollTable = "" 
)

Return the identications of the geometries of a spatial table that have a topological relation with specifics geometries of this spatial table.

Calculate the topological relation between all geometries of a spatial table and specifics geometries of this spatial table

Parameters:
actGeomTablespatial table name that contains all the geometries
actRepgeometrical representation of the spatial table
actIdsInidentifications of the specifics geometries (object_id)
actIdsOutreturned with the identications of the resultants geometries (object_id)
dba TeDatabase pointer
relationtopological relation that will be computed
actCollTablecollection table name that contains a set of geometries of the spatial table
TL_DLL bool TeTopologicalRelation ( const TePolygon geom1,
const TeLine2D geom2,
int  relation 
)

Return whether the specified topological relation holds between a polygon and a line.

Parameters:
geom1a polygon
geom2a line
relationtopological relation to be verified
TL_DLL bool TeTopologicalRelation ( const string actGeomTable,
TeGeomRep  actRep,
TeGeometry geom,
TeDatabasePortal portal,
int  relation,
const string actCollTable = "" 
)

Return a portal with the geometries of a spatial table that have a topological relation with a specific geometry.

Calculate the topological relation between all geometries of a spatial table and a specific geometry

Parameters:
actGeomTablespatial table name that contains the geometries
actRepgeometrical representation of the spatial table
geoma specific geometry
portalreturned with the resultants geometries
relationtopological relation that will be computed
actCollTablecollection table name that contains a set of geometries of the spatial table
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines