QGIS API Documentation
2.2.0-Valmiera
|
Interpolation in a triangular irregular network. More...
#include <qgstininterpolator.h>
Public Types | |
enum | TIN_INTERPOLATION { Linear, CloughTocher } |
Public Types inherited from QgsInterpolator | |
enum | InputType { POINTS, STRUCTURE_LINES, BREAK_LINES } |
Describes the type of input data. More... |
Public Member Functions | |
QgsTINInterpolator (const QList< LayerData > &inputData, TIN_INTERPOLATION interpolation=Linear, bool showProgressDialog=false) | |
~QgsTINInterpolator () | |
int | interpolatePoint (double x, double y, double &result) |
Calculates interpolation value for map coordinates x, y. | |
void | setExportTriangulationToFile (bool e) |
void | setTriangulationFilePath (const QString &filepath) |
Public Member Functions inherited from QgsInterpolator | |
QgsInterpolator (const QList< LayerData > &layerData) | |
virtual | ~QgsInterpolator () |
Private Member Functions | |
void | initialize () |
Create dual edge triangulation. | |
int | insertData (QgsFeature *f, bool zCoord, int attr, InputType type) |
Inserts the vertices of a feature into the triangulation. |
Private Attributes | |
Triangulation * | mTriangulation |
TriangleInterpolator * | mTriangleInterpolator |
bool | mIsInitialized |
bool | mShowProgressDialog |
bool | mExportTriangulationToFile |
If true: export triangulation to shapefile after initialisation. | |
QString | mTriangulationFilePath |
File path to export the triangulation. | |
TIN_INTERPOLATION | mInterpolation |
Type of interpolation. |
Additional Inherited Members | |
Protected Member Functions inherited from QgsInterpolator | |
int | cacheBaseData () |
Caches the vertex and value data from the provider. | |
Protected Attributes inherited from QgsInterpolator | |
QVector< vertexData > | mCachedBaseData |
bool | mDataIsCached |
Flag that tells if the cache already has been filled. | |
QList< LayerData > | mLayerData |
Interpolation in a triangular irregular network.
Definition at line 29 of file qgstininterpolator.h.
Definition at line 33 of file qgstininterpolator.h.
QgsTINInterpolator::QgsTINInterpolator | ( | const QList< LayerData > & | inputData, |
TIN_INTERPOLATION | interpolation = Linear , |
||
bool | showProgressDialog = false |
||
) |
Definition at line 29 of file qgstininterpolator.cpp.
QgsTINInterpolator::~QgsTINInterpolator | ( | ) |
Definition at line 40 of file qgstininterpolator.cpp.
References mTriangleInterpolator, and mTriangulation.
|
private |
Create dual edge triangulation.
Definition at line 67 of file qgstininterpolator.cpp.
References TriDecorator::addTriangulation(), CloughTocher, NormVecDecorator::estimateFirstDerivatives(), insertData(), mExportTriangulationToFile, mInterpolation, mIsInitialized, QgsInterpolator::mLayerData, mShowProgressDialog, mTriangleInterpolator, mTriangulation, mTriangulationFilePath, QgsFeatureIterator::nextFeature(), DualEdgeTriangulation::saveAsShapefile(), NormVecDecorator::setTriangleInterpolator(), CloughTocherInterpolator::setTriangulation(), and tr.
Referenced by interpolatePoint().
|
private |
Inserts the vertices of a feature into the triangulation.
f | the feature |
zCoord | true if the z coordinate is the interpolation attribute |
attr | interpolation attribute index (if zCoord is false) |
type | point/structure line, break line |
Definition at line 168 of file qgstininterpolator.cpp.
References Triangulation::addLine(), Triangulation::addPoint(), QgsGeometry::asWkb(), QgsFeature::attribute(), QgsInterpolator::BREAK_LINES, QgsFeature::geometry(), index, Line3D::insertPoint(), mTriangulation, QgsInterpolator::POINTS, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and QgsGeometry::wkbType().
Referenced by initialize().
|
virtual |
Calculates interpolation value for map coordinates x, y.
x | x-coordinate (in map units) |
y | y-coordinate (in map units) |
result | out: interpolation result |
Implements QgsInterpolator.
Definition at line 46 of file qgstininterpolator.cpp.
References TriangleInterpolator::calcPoint(), Point3D::getZ(), initialize(), mIsInitialized, and mTriangleInterpolator.
|
inline |
Definition at line 48 of file qgstininterpolator.h.
|
inline |
Definition at line 49 of file qgstininterpolator.h.
|
private |
If true: export triangulation to shapefile after initialisation.
Definition at line 57 of file qgstininterpolator.h.
Referenced by initialize().
|
private |
Type of interpolation.
Definition at line 61 of file qgstininterpolator.h.
Referenced by initialize().
|
private |
Definition at line 54 of file qgstininterpolator.h.
Referenced by initialize(), and interpolatePoint().
|
private |
Definition at line 55 of file qgstininterpolator.h.
Referenced by initialize().
|
private |
Definition at line 53 of file qgstininterpolator.h.
Referenced by initialize(), interpolatePoint(), and ~QgsTINInterpolator().
|
private |
Definition at line 52 of file qgstininterpolator.h.
Referenced by initialize(), insertData(), and ~QgsTINInterpolator().
|
private |
File path to export the triangulation.
Definition at line 59 of file qgstininterpolator.h.
Referenced by initialize().