1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/interpolation/qgsinterpolator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
%ModuleHeaderCode
#include "qgsinterpolator.h"
%End
struct QgsInterpolatorVertexData
{
QgsInterpolatorVertexData( double x, double y, double z );
%Docstring
Constructor for QgsInterpolatorVertexData with the specified ``x``,
``y``, and ``z`` coordinate.
%End
QgsInterpolatorVertexData();
double x;
double y;
double z;
};
class QgsInterpolator
{
%Docstring(signature="appended")
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 3D types.
%End
%TypeHeaderCode
#include "qgsinterpolator.h"
%End
public:
enum SourceType /BaseType=IntEnum/
{
SourcePoints,
SourceStructureLines,
SourceBreakLines,
};
enum ValueSource /BaseType=IntEnum/
{
ValueAttribute,
ValueZ,
ValueM,
};
enum Result /BaseType=IntEnum/
{
Success,
Canceled,
InvalidSource,
FeatureGeometryError,
};
struct LayerData
{
QgsFeatureSource *source;
QgsInterpolator::ValueSource valueSource;
int interpolationAttribute;
QgsInterpolator::SourceType sourceType;
QgsCoordinateTransformContext transformContext;
};
QgsInterpolator( const QList<QgsInterpolator::LayerData> &layerData );
virtual ~QgsInterpolator();
virtual int interpolatePoint( double x, double y, double &result /Out/, QgsFeedback *feedback = 0 ) = 0;
%Docstring
Calculates interpolation value for map coordinates x, y
:param x: x-coordinate (in map units)
:param y: y-coordinate (in map units)
:param feedback: optional feedback object for progress and cancellation
support
:return: - 0 in case of success
- result: interpolation result
%End
protected:
Result cacheBaseData( QgsFeedback *feedback = 0 );
%Docstring
Caches the vertex and value data from the provider. All the vertex data
will be held in virtual memory.
An optional ``feedback`` argument may be specified to allow cancellation
and progress reports from the cache operation.
:return: Success in case of success
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/interpolation/qgsinterpolator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|