mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-30 00:07:09 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			120 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			120 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * 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 class SourceType /BaseType=IntEnum/
 | |
|     {
 | |
|       Points,
 | |
|       StructureLines,
 | |
|       BreakLines,
 | |
|     };
 | |
| 
 | |
|     enum class ValueSource /BaseType=IntEnum/
 | |
|     {
 | |
|       Attribute,
 | |
|       Z,
 | |
|       M,
 | |
|     };
 | |
| 
 | |
|     enum class 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   *
 | |
|  ************************************************************************/
 |