QGIS/python/core/auto_generated/mesh/qgsmeshdataprovider.sip.in

289 lines
6.6 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/mesh/qgsmeshdataprovider.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
typedef QgsPoint QgsMeshVertex;
typedef QVector<int> QgsMeshFace;
class QgsMeshDatasetValue
{
%Docstring
2018-05-16 17:02:35 +02:00
QgsMeshDatasetValue represents single mesh dataset value
could be scalar or vector. Nodata values are represented by NaNs.
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
QgsMeshDatasetValue( double x,
double y );
%Docstring
2018-05-16 17:02:35 +02:00
Constructor for vector value
%End
QgsMeshDatasetValue( double scalar );
%Docstring
2018-05-16 17:02:35 +02:00
Constructor for scalar value
%End
2018-05-16 17:02:35 +02:00
QgsMeshDatasetValue();
%Docstring
2018-05-16 17:02:35 +02:00
Default Ctor, initialize to NaN
%End
~QgsMeshDatasetValue();
void set( double scalar );
%Docstring
Sets scalar value
%End
void setX( double x );
%Docstring
Sets X value
%End
void setY( double y );
%Docstring
Sets Y value
2018-05-16 17:02:35 +02:00
%End
double scalar() const;
%Docstring
Returns magnitude of vector for vector data or scalar value for scalar data
%End
double x() const;
%Docstring
Returns x value
%End
double y() const;
%Docstring
Returns y value
%End
bool operator==( const QgsMeshDatasetValue &other ) const;
};
2018-05-16 17:02:35 +02:00
class QgsMeshDatasetMetadata
{
%Docstring
QgsMeshDatasetMetadata is a collection of mesh dataset metadata such
2018-05-22 14:32:20 +02:00
as whether the data is vector or scalar, etc.
2018-05-16 17:02:35 +02:00
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
QgsMeshDatasetMetadata();
2018-05-16 17:26:59 -04:00
%Docstring
Constructs an empty metadata object
%End
2018-05-22 14:32:20 +02:00
2018-05-16 17:02:35 +02:00
QgsMeshDatasetMetadata( bool isScalar,
bool isValid,
bool isOnVertices,
const QMap<QString, QString> &extraOptions );
2018-05-16 17:26:59 -04:00
%Docstring
2018-05-22 14:32:20 +02:00
Constructs a valid metadata object
2018-05-24 08:16:11 +02:00
:param isScalar: dataset contains scalar data, specifically the y-value of QgsMeshDatasetValue is NaN
2018-05-22 14:32:20 +02:00
:param isValid: dataset is loadad and valid for fetching the data
:param isOnVertices: dataset values are defined on mesh's vertices. If false, values are defined on faces.
:param extraOptions: dataset's extra options stored by the provider. Usually contains the name, time value, time units, data file vendor, ...
2018-05-16 17:26:59 -04:00
%End
2018-05-16 17:02:35 +02:00
QMap<QString, QString> extraOptions() const;
%Docstring
Returns extra metadata options
Usually including name, description or time variable
%End
bool isVector() const;
%Docstring
Returns whether dataset has vector data
%End
bool isScalar() const;
%Docstring
Returns whether dataset has scalar data
%End
bool isOnVertices() const;
%Docstring
Returns whether dataset data is defined on vertices
%End
bool isValid() const;
%Docstring
Returns whether dataset is valid
%End
};
2018-05-22 14:32:20 +02:00
class QgsMeshDataSourceInterface /Abstract/
{
%Docstring
2018-05-22 14:32:20 +02:00
Interface for mesh data sources
Mesh is a collection of vertices and faces in 2D or 3D space
- vertex - XY(Z) point (in the mesh's coordinate reference system)
- faces - sets of vertices forming a closed shape - typically triangles or quadrilaterals
Base on the underlying data provider/format, whole mesh is either stored in memory or
read on demand
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
2018-05-22 14:32:20 +02:00
virtual ~QgsMeshDataSourceInterface();
virtual int vertexCount() const = 0;
%Docstring
Returns number of vertices in the native mesh
:return: Number of vertices in the mesh
%End
virtual int faceCount() const = 0;
%Docstring
Returns number of faces in the native mesh
:return: Number of faces in the mesh
%End
virtual QgsMeshVertex vertex( int index ) const = 0;
%Docstring
2018-05-22 14:35:10 +02:00
Returns the mesh vertex at index
%End
virtual QgsMeshFace face( int index ) const = 0;
%Docstring
2018-05-22 14:35:10 +02:00
Returns the mesh face at index
%End
};
2018-05-22 14:32:20 +02:00
class QgsMeshDatasetSourceInterface /Abstract/
{
%Docstring
2018-05-22 14:32:20 +02:00
Interface for mesh datasets
2018-05-22 14:32:20 +02:00
Dataset is a collection of vector or scalar values on vertices or faces of the mesh.
Based on the underlying data provider/format, whole dataset is either stored in memory
or read on demand
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
2018-05-22 14:32:20 +02:00
virtual ~QgsMeshDatasetSourceInterface();
virtual bool addDataset( const QString &uri ) = 0;
%Docstring
Associate dataset with the mesh
%End
virtual int datasetCount() const = 0;
%Docstring
Returns number of datasets loaded
%End
2018-05-16 17:02:35 +02:00
virtual QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const = 0;
%Docstring
Returns dataset metadata
%End
virtual QgsMeshDatasetValue datasetValue( int datasetIndex, int valueIndex ) const = 0;
%Docstring
2018-05-16 17:02:35 +02:00
Returns vector/scalar value associated with the index from the dataset
2018-05-16 17:02:35 +02:00
See QgsMeshDatasetMetadata.isVector() to check if the returned value is vector or scalar
%End
};
2018-05-22 14:32:20 +02:00
class QgsMeshDataProvider: QgsDataProvider, QgsMeshDataSourceInterface, QgsMeshDatasetSourceInterface
{
%Docstring
Base class for providing data for :py:class:`QgsMeshLayer`
Responsible for reading native mesh data
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
2018-04-20 09:38:39 +02:00
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
QgsMeshDataProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options );
%Docstring
Ctor
%End
virtual QgsRectangle extent() const;
%Docstring
Returns the extent of the layer
:return: QgsRectangle containing the extent of the layer
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/mesh/qgsmeshdataprovider.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/