#include <Slope.h>
Public Member Functions | |
bool | BuildTriangle (int32_t id, te::gm::LinearRing *lr, double *val, int32_t *right, int32_t *left, te::mnt::Ntype *type, double zmin, double zmax, bool &first, KD_TREE &nodetree, te::sam::rtree::Index< std::size_t > &linetree) |
bool | LoadTin (te::da::DataSourcePtr &inDsrc, std::string &inDsetName, double zmin=std::numeric_limits< double >::min(), double zmax=std::numeric_limits< double >::max()) |
Method used to load a triangular network (TIN) More... | |
bool | LoadTinQGIS (te::da::DataSourcePtr &inDsrc, std::string &inDsetName, double zmin, double zmax) |
Method used to load a triangular network (TIN) generated by QGIS. More... | |
bool | run () |
bool | SaveTin (te::da::DataSourcePtr &outDsrc, std::string &outDsetName) |
void | setEnvelope (te::gm::Envelope &env) |
void | setInput (te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_ptr< te::da::DataSetType > inDsetType) |
void | setOutput (std::map< std::string, std::string > &dsinfo) |
void | setParams (double resx, double resy, char gradtype, char slopetype, int srid, double dummy) |
void | setSRID (int srid) |
Slope () | |
~Slope () | |
Protected Member Functions | |
bool | BreakNodeClosestPoints (int32_t nid, int32_t *rClstNids, int32_t *lClstNids) |
Method that searches the Break node closest points. More... | |
bool | BreakNodeFirstDeriv () |
Method that calculates the first derivatives in the nodes of a given break triangle. More... | |
bool | BreakNodeSecondDeriv () |
Method that calculates the second derivative at all triangulation break nodes. More... | |
bool | BreakTriangleSecondDeriv () |
Method that calculates the second derivatives in the nodes of a given break triangle. More... | |
te::gm::Point | CalcNodeFirstDeriv (int32_t nodeId, int32_t clstNodes[CLNODES]) |
Method that calculates the first derivative in a given node. More... | |
TinNode | CalcNodeSecondDeriv (int32_t nodeId, int32_t clstNIds[CLNODES]) |
Method that calculates the second derivative in a given node. More... | |
bool | CalcTriangleSecondDeriv (std::vector< int32_t > &triangles, std::vector< te::gm::Point > &fderiv) |
Method that calculates the second derivatives in a node of a given triangle. More... | |
bool | CalcZvalueAkima (int32_t triid, te::gm::Point &pt1, te::gm::Point &pt2) |
Method that evaluates Z values for pt1 and pt2 using the Akima polynomium fitted in a triangle. More... | |
bool | CheckLines (int32_t trid) |
Method that check the lines in a triangulation. More... | |
bool | CheckTopology () |
Method that check the topology in a triangulation. More... | |
bool | ContainsPoint (int32_t triangId, te::gm::Point &pt) |
Method that verifies if a triangle contains a given point. More... | |
bool | DefineAkimaCoeficients (int32_t triid, double *coef) |
Method that defines the coefficients of the Akima polynomium fitted in a given triangle. More... | |
bool | DefineAkimaCoeficients (int32_t triid, int32_t *nodesid, te::gm::Point *p3d, double *coef) |
Method that defines the coefficients of the Akima polynomium fitted in a given triangle. More... | |
bool | DefineInterLinesColumns (int32_t *nodesid, int32_t &flin, int32_t &llin, int32_t &fcol, int32_t &lcol) |
Method that calculates the lines and the columns intercepted by a triangle. More... | |
bool | FillGridValue (int32_t triid, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol, double zvalue) |
std::vector< int32_t > | FindLine (int32_t nid) |
Method that find a line containing a specific node. More... | |
int32_t | FindLine (int32_t fnid, int32_t snid) |
Method that find a line given two nodes identification. More... | |
int32_t | FindTriangle (te::gm::Point &ptr1) |
Method that finds a triangle containing a given point. More... | |
te::da::DataSetType * | GetDataSetType (std::string &outDsetName) |
bool | NeighborsId (int32_t triangId, int32_t *neighsId) |
int32_t | NextNode (int32_t nodeId) |
Method that finds out which is the next node. More... | |
bool | NodeClosestPoints (int32_t nid, int32_t *clstNids, bool useBrNode=true) |
Method that searches the closest points of a specific node. More... | |
bool | NodeDerivatives () |
Method that calculates the first and second derivatives in the nodes of a given triangle. More... | |
bool | NodeFirstDeriv () |
Method that calculates the first derivatives in the nodes of a given triangle. More... | |
int32_t | NodeId (int32_t triangId, short vertex) |
Method that reads the identification number of the nodes of a given triangle. More... | |
bool | NodeLines (int32_t v, std::vector< int32_t > &linids) |
Method that includes a node in the tin line list. More... | |
bool | NodeNodes (int32_t v, std::vector< int32_t > &nodids) |
Method that includes a node in the tin node list. More... | |
bool | NodeOppositeLines (int32_t v, std::vector< int32_t > &linids) |
Method that find the oposite lines of a specific node. More... | |
bool | NodeSecondDeriv () |
Method that calculates the second derivative at all triangulation nodes. More... | |
bool | NodesId (int32_t triangId, int32_t *nodeIds) |
Method that reads the identification number of the nodes of a given triangle. More... | |
int32_t | NodeTriangle (int32_t v) |
Method that search a node in a triangulation. More... | |
bool | NodeTriangles (int32_t v, std::vector< int32_t > &triangles) |
Method that includes a node in a triangle list. More... | |
bool | NodeTriangles (int32_t nodeid, std::vector< int32_t > &rightri, std::vector< int32_t > &leftri) |
Method that find the triangle list sharing a given node. More... | |
int32_t | OppositeEdge (int32_t triangId, int32_t nodeId) |
Method that reads the identification number of the opposite edge of a given node. More... | |
int32_t | OppositeNode (int32_t triangId, int32_t linId) |
Method that reads the identification number of the opposite node of a given edge. More... | |
int32_t | PreviousNode (int32_t nodeId) |
Method that finds out which is the previous node. More... | |
bool | ReallocateVectors (size_t nSize) |
Method that reallocates Vectors. More... | |
bool | TriangleFirstDeriv () |
Method that calculates the first derivatives in the nodes of a given triangle. More... | |
bool | TrianglePoints (int32_t triangId, te::gm::Point *vertex) |
Method that reads the vertex (points) of a given triangle. More... | |
bool | TriangleSecondDeriv () |
Method that calculates the second derivatives in the nodes of a given triangle. More... | |
Protected Attributes | |
std::map< std::string, std::string > | m_dsinfo |
double | m_dummy |
double | m_dx |
double | m_dy |
te::gm::Envelope | m_env |
Attribute used to restrict the area to generate the samples. More... | |
int32_t | m_fbnode |
First break node number. More... | |
char | m_gradtype |
std::string | m_inDsetName |
std::auto_ptr< te::da::DataSetType > | m_inDsetType |
te::da::DataSourcePtr | m_inDsrc |
mntType | m_inputType |
Input type (TIN, GRID) More... | |
std::vector< TinLine > | m_line |
Triangulation lines vector. More... | |
size_t | m_linesize |
Triangulation lines vector size. More... | |
int32_t | m_lline |
Triangulation last line number. More... | |
int32_t | m_lnode |
Triangulation last node number. More... | |
int32_t | m_ltriang |
Triangulation last triangle number. More... | |
double | m_max |
double | m_min |
std::vector< te::gm::Point > | m_nblfderiv |
std::vector< TinNode > | m_nblsderiv |
std::vector< te::gm::Point > | m_nbrfderiv |
std::vector< TinNode > | m_nbrsderiv |
std::vector< te::gm::Point > | m_nfderiv |
double | m_nodatavalue |
std::vector< TinNode > | m_node |
Triangulation nodes vector. More... | |
size_t | m_nodesize |
Triangulation nodes vector size. More... | |
std::vector< TinNode > | m_nsderiv |
double | m_resx |
double | m_resy |
te::rst::Raster * | m_rst |
char | m_slopetype |
int | m_srid |
Attribute with spatial reference information. More... | |
std::vector< te::gm::Point > | m_tfderiv |
double | m_tol |
std::vector< TinTriang > | m_triang |
Triangulation triangles vector. More... | |
size_t | m_triangsize |
Triangulation triangles vector size. More... | |
std::vector< TinNode > | m_tsderiv |
Private Member Functions | |
bool | CalcGradientRst (std::auto_ptr< te::rst::Raster > &raster, unsigned l, unsigned c, double &dzdx, double &dzdy) |
METHOD TO CALCULATE GRADIENT VECTOR COMPONENTS IN THE POINT L,C OF THE GRID. More... | |
double | TriangleGradient (int32_t *nodesid, char gradtype, char slopetype) |
Method that calculates a gradient value (slope or aspect) in a given triangle. More... | |
te::mnt::Slope::Slope | ( | ) |
te::mnt::Slope::~Slope | ( | ) |
|
protectedinherited |
Method that searches the Break node closest points.
nid | is the node identification number |
rClstNids | is a pointer to a list of right node identificators |
lClstNids | is a pointer to a list of left node identificators |
|
protectedinherited |
Method that calculates the first derivatives in the nodes of a given break triangle.
|
protectedinherited |
Method that calculates the second derivative at all triangulation break nodes.
|
protectedinherited |
Method that calculates the second derivatives in the nodes of a given break triangle.
|
inherited |
|
private |
METHOD TO CALCULATE GRADIENT VECTOR COMPONENTS IN THE POINT L,C OF THE GRID.
raster | input grid |
l | and c are the line and column of the input grid |
dzdx | and dzdy are values of the first derivatives of z in the x and y directions at location l,c |
|
protectedinherited |
Method that calculates the first derivative in a given node.
nodeid | is the node identification number |
clstNodes | is the vector of a list of nodes) |
|
protectedinherited |
Method that calculates the second derivative in a given node.
nodeid | is the node identification number |
clstNIds | is the vector of a list of nodes identification |
|
protectedinherited |
Method that calculates the second derivatives in a node of a given triangle.
triangles | is a pointer to a list of triangle identificators (SIDList object) |
fderiv | is a pointer to a Point object representing the first derivative in x and y directions |
|
protectedinherited |
Method that evaluates Z values for pt1 and pt2 using the Akima polynomium fitted in a triangle.
triid | is the triangle identificator number |
pt1 | is a pointer to a Point3d object |
pt2 | is a pointer to a Point3d object |
|
protectedinherited |
Method that check the lines in a triangulation.
|
protectedinherited |
Method that check the topology in a triangulation.
|
protectedinherited |
Method that verifies if a triangle contains a given point.
triangId | is the triangle identification number |
pt | is a pointer to a te::gm::PointZ object |
|
protectedinherited |
Method that defines the coefficients of the Akima polynomium fitted in a given triangle.
triid | is the triangle identification number |
coef | is a pointer to a double vector containing the polynomium coefficients |
|
protectedinherited |
Method that defines the coefficients of the Akima polynomium fitted in a given triangle.
triid | is the triangle identification number |
nodesid | is the list of triangle nodes identification |
p3d | is a pointer to a Point3d object |
coef | is a pointer to a double vector containing the polynomium coefficients |
|
protectedinherited |
Method that calculates the lines and the columns intercepted by a triangle.
grid | is a pointer to a grid object that will be created |
nodesid | is a vector with nodes identification of the current triangle |
flin | and llin are the first and the last lines (rows) of the grid |
fcol | and lcol are the first and the last columns of the grid |
|
protectedinherited |
|
protectedinherited |
Method that find a line containing a specific node.
nid | is the node identification number |
|
protectedinherited |
Method that find a line given two nodes identification.
fnid | is the first node identification number |
snid | is the second node identification number |
|
protectedinherited |
Method that finds a triangle containing a given point.
ptr1 | is a pointer to a Point object |
|
protectedinherited |
|
inherited |
Method used to load a triangular network (TIN)
|
inherited |
Method used to load a triangular network (TIN) generated by QGIS.
|
protectedinherited |
|
protectedinherited |
Method that finds out which is the next node.
nodeId | is the node identification number |
|
protectedinherited |
Method that searches the closest points of a specific node.
nid | is the node identification number |
clstNids | is a pointer to a list of closest node identificators |
useBrNode | is the break nodeidentification |
|
protectedinherited |
Method that calculates the first and second derivatives in the nodes of a given triangle.
|
protectedinherited |
Method that calculates the first derivatives in the nodes of a given triangle.
|
protectedinherited |
Method that reads the identification number of the nodes of a given triangle.
triangId | is the triangle identification number |
vertex | is the number of the vertex to be considered |
|
protectedinherited |
Method that includes a node in the tin line list.
v | is the node identificator number |
linids | is a pointer to a list of line identificators |
|
protectedinherited |
Method that includes a node in the tin node list.
v | is the node identification number |
nodids | is a pointer to a list of node identificators |
|
protectedinherited |
Method that find the oposite lines of a specific node.
v | is the node identification number |
linids | is pointer to a list of line identificators |
|
protectedinherited |
Method that calculates the second derivative at all triangulation nodes.
|
protectedinherited |
Method that reads the identification number of the nodes of a given triangle.
triangId | is the triangle identification number |
nodesIds | is a pointer to a list of node identification numbers |
|
protectedinherited |
Method that search a node in a triangulation.
v | is the node identification number |
|
protectedinherited |
Method that includes a node in a triangle list.
v | is the node identification number |
triangles | is pointer to a vetor of triangles |
|
protectedinherited |
Method that find the triangle list sharing a given node.
nodeid | is the node identification number |
rightri | is a pointer to the triangles at right side |
lefttri | is a pointer to the triangles at left side |
|
protectedinherited |
Method that reads the identification number of the opposite edge of a given node.
triangId | is the triangle identification number |
nodeId | is the node identification number |
|
protectedinherited |
Method that reads the identification number of the opposite node of a given edge.
triangId | is the triangle identification number |
linId | is the line identification number |
|
protectedinherited |
Method that finds out which is the previous node.
nodeId | is the node identification number |
|
protectedinherited |
Method that reallocates Vectors.
nSize | is the vector size |
bool te::mnt::Slope::run | ( | ) |
|
inherited |
|
inherited |
Function used to set the envelope parameter
void te::mnt::Slope::setInput | ( | te::da::DataSourcePtr | inDsrc, |
std::string | inDsetName, | ||
std::auto_ptr< te::da::DataSetType > | inDsetType | ||
) |
void te::mnt::Slope::setOutput | ( | std::map< std::string, std::string > & | dsinfo | ) |
void te::mnt::Slope::setParams | ( | double | resx, |
double | resy, | ||
char | gradtype, | ||
char | slopetype, | ||
int | srid, | ||
double | dummy | ||
) |
|
inherited |
Function used to set the Spatial Reference System ID
|
protectedinherited |
Method that calculates the first derivatives in the nodes of a given triangle.
|
private |
Method that calculates a gradient value (slope or aspect) in a given triangle.
nodesid | is a pointer to the triangle node identifications |
gradtype | is the type of gradient ('s' slope or 'a' aspect) |
slopetype | is the type of slope ('g' degree or 'p' percentage) |
|
protectedinherited |
Method that reads the vertex (points) of a given triangle.
triangId | is the triangle identification number |
vertex | is a pointer to a list of Point object, the triangle vertices |
|
protectedinherited |
Method that calculates the second derivatives in the nodes of a given triangle.
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |