QGIS/python/analysis/interpolation/qgsinterpolator.sip

138 lines
3.2 KiB
Plaintext
Raw Normal View History

2017-06-22 20:25:19 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/interpolation/qgsinterpolator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-11-02 19:45:17 +10:00
struct QgsInterpolatorVertexData
2017-06-22 20:25:19 +02:00
{
2017-11-02 19:45:17 +10:00
QgsInterpolatorVertexData( double x, double y, double z );
%Docstring
Constructor for QgsInterpolatorVertexData with the specified
``x``, ``y``, and ``z`` coordinate.
%End
QgsInterpolatorVertexData();
%Docstring
Constructor for QgsInterpolatorVertexData
%End
2017-06-22 20:25:19 +02:00
double x;
2017-11-02 19:45:17 +10:00
%Docstring
X-coordinate
%End
2017-06-22 20:25:19 +02:00
double y;
2017-11-02 19:45:17 +10:00
%Docstring
Y-coordinate
%End
2017-06-22 20:25:19 +02:00
double z;
2017-11-02 19:45:17 +10:00
%Docstring
Z-coordinate
%End
2017-06-22 20:25:19 +02:00
};
class QgsInterpolator
{
2017-06-22 20:25:19 +02:00
%Docstring
Interface class for interpolations. Interpolators take
2017-11-02 19:45:17 +10:00
the vertices of a vector layer as base data. The z-Value
can be an attribute or the z-coordinates in case of 3D types.
2017-06-22 20:25:19 +02:00
%End
%TypeHeaderCode
#include "qgsinterpolator.h"
%End
public:
2017-11-02 19:45:17 +10:00
enum SourceType
{
2017-11-02 19:45:17 +10:00
SourcePoints,
SourceStructureLines,
SourceBreakLines,
};
enum ValueSource
{
ValueAttribute,
ValueZ,
ValueM,
};
2017-11-02 19:45:17 +10:00
enum Result
{
Success,
Canceled,
InvalidSource,
FeatureGeometryError,
};
struct LayerData
{
2017-11-02 19:45:17 +10:00
QgsFeatureSource *source;
%Docstring
Feature source
%End
ValueSource valueSource;
2017-11-02 19:45:17 +10:00
%Docstring
Source for feature values to interpolate
2017-11-02 19:45:17 +10:00
%End
int interpolationAttribute;
2017-11-02 19:45:17 +10:00
%Docstring
Index of feature attribute to use for interpolation
%End
QgsInterpolator::SourceType sourceType;
%Docstring
Source type
%End
};
QgsInterpolator( const QList<QgsInterpolator::LayerData> &layerData );
virtual ~QgsInterpolator();
2017-11-02 19:45:17 +10:00
virtual int interpolatePoint( double x, double y, double &result, QgsFeedback *feedback = 0 ) = 0;
2017-06-22 20:25:19 +02:00
%Docstring
Calculates interpolation value for map coordinates x, y
2017-11-02 19:45:17 +10:00
\param x x-coordinate (in map units)
\param y y-coordinate (in map units)
\param result out: interpolation result
\param feedback optional feedback object for progress and cancelation support
:return: 0 in case of success*
2017-06-22 20:25:19 +02:00
:rtype: int
%End
2014-05-27 23:22:50 +02:00
protected:
2017-06-22 20:25:19 +02:00
2017-11-02 19:45:17 +10:00
Result cacheBaseData( QgsFeedback *feedback = 0 );
2017-06-22 20:25:19 +02:00
%Docstring
Caches the vertex and value data from the provider. All the vertex data
2017-11-02 19:45:17 +10:00
will be held in virtual memory.
An optional ``feedback`` argument may be specified to allow cancelation and
progress reports from the cache operation.
:return: Success in case of success
:rtype: Result
2017-06-22 20:25:19 +02:00
%End
};
2017-06-22 20:25:19 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/interpolation/qgsinterpolator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/