QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsInterpolator Class Referenceabstract

Interface class for interpolations. More...

#include <qgsinterpolator.h>

Inheritance diagram for QgsInterpolator:
Inheritance graph
[legend]

Classes

struct  LayerData
 A layer together with the information about interpolation attribute / z-coordinate interpolation and the type (point, structure line, breakline) More...
 

Public Types

enum  InputType { POINTS, STRUCTURE_LINES, BREAK_LINES }
 Describes the type of input data. More...
 

Public Member Functions

 QgsInterpolator (const QList< LayerData > &layerData)
 
virtual ~QgsInterpolator ()
 
virtual int interpolatePoint (double x, double y, double &result)=0
 Calculates interpolation value for map coordinates x, y. More...
 
const QList< LayerData > & layerData () const
 

Protected Member Functions

int cacheBaseData ()
 Caches the vertex and value data from the provider. More...
 

Protected Attributes

QVector< vertexDatamCachedBaseData
 
bool mDataIsCached
 Flag that tells if the cache already has been filled. More...
 
QList< LayerDatamLayerData
 

Detailed Description

Interface class for interpolations.

Interpolators take the vertices of a vector layer as base data. The z-Value can be an attribute or the z-coordinates in case of 25D types

Definition at line 37 of file qgsinterpolator.h.

Member Enumeration Documentation

◆ InputType

Describes the type of input data.

Enumerator
POINTS 
STRUCTURE_LINES 
BREAK_LINES 

Definition at line 41 of file qgsinterpolator.h.

Constructor & Destructor Documentation

◆ QgsInterpolator()

QgsInterpolator::QgsInterpolator ( const QList< LayerData > &  layerData)

Definition at line 24 of file qgsinterpolator.cpp.

◆ ~QgsInterpolator()

QgsInterpolator::~QgsInterpolator ( )
virtual

Definition at line 37 of file qgsinterpolator.cpp.

Member Function Documentation

◆ cacheBaseData()

int QgsInterpolator::cacheBaseData ( )
protected

Caches the vertex and value data from the provider.

All the vertex data will be held in virtual memory

Returns
0 in case of success

Definition at line 42 of file qgsinterpolator.cpp.

◆ interpolatePoint()

virtual int QgsInterpolator::interpolatePoint ( double  x,
double  y,
double &  result 
)
pure virtual

Calculates interpolation value for map coordinates x, y.

Parameters
xx-coordinate (in map units)
yy-coordinate (in map units)
resultout: interpolation result
Returns
0 in case of success

Implemented in QgsTINInterpolator, and QgsIDWInterpolator.

◆ layerData()

const QList<LayerData>& QgsInterpolator::layerData ( ) const
inline
Note
not available in Python bindings

Definition at line 69 of file qgsinterpolator.h.

Member Data Documentation

◆ mCachedBaseData

QVector<vertexData> QgsInterpolator::mCachedBaseData
protected

Definition at line 77 of file qgsinterpolator.h.

◆ mDataIsCached

bool QgsInterpolator::mDataIsCached
protected

Flag that tells if the cache already has been filled.

Definition at line 80 of file qgsinterpolator.h.

◆ mLayerData

QList<LayerData> QgsInterpolator::mLayerData
protected

Definition at line 83 of file qgsinterpolator.h.


The documentation for this class was generated from the following files: