2018-04-06 16:11:50 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/mesh/qgsmeshdataprovider.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 15:03:21 +02:00
|
|
|
typedef QgsPoint QgsMeshVertex;
|
|
|
|
|
|
|
|
typedef QVector<int> QgsMeshFace;
|
|
|
|
|
|
|
|
typedef QMap<QString, QString> QgsMeshDatasetMetadata;
|
|
|
|
|
|
|
|
class QgsMeshDatasetValue
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
|
|
|
|
QgsMeshDatasetValue is a vector or a scalar value on vertex or face of the mesh with
|
|
|
|
support of nodata values
|
|
|
|
|
2018-05-10 18:56:08 -04:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
|
2018-05-09 15:03:21 +02:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmeshdataprovider.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsMeshDatasetValue( double x,
|
|
|
|
double y );
|
|
|
|
QgsMeshDatasetValue( double scalar );
|
|
|
|
QgsMeshDatasetValue( );
|
|
|
|
|
|
|
|
~QgsMeshDatasetValue();
|
|
|
|
void setNodata( bool nodata = true );
|
|
|
|
bool isNodata() const;
|
|
|
|
bool isScalar() const;
|
|
|
|
double scalar() const; //length for vectors, value for scalars
|
|
|
|
void set( double scalar );
|
|
|
|
void setX( double x );
|
|
|
|
void setY( double y );
|
|
|
|
double x() const;
|
|
|
|
double y() const;
|
|
|
|
bool operator==( const QgsMeshDatasetValue &other ) const;
|
|
|
|
|
|
|
|
};
|
2018-04-06 16:11:50 +02:00
|
|
|
|
|
|
|
class QgsMeshSource /Abstract/
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
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
|
|
|
|
|
2018-05-10 18:56:08 -04:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
|
2018-04-06 16:11:50 +02:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmeshdataprovider.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
virtual ~QgsMeshSource();
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual int vertexCount() const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
2018-04-19 16:42:01 +02:00
|
|
|
Return number of vertices in the native mesh
|
2018-04-06 16:11:50 +02:00
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
:return: Number of vertices in the mesh
|
2018-04-06 16:11:50 +02:00
|
|
|
%End
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual int faceCount() const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
|
|
|
Return number of faces in the native mesh
|
|
|
|
|
|
|
|
:return: Number of faces in the mesh
|
|
|
|
%End
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual QgsMeshVertex vertex( int index ) const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
|
|
|
Factory for mesh vertex with index
|
|
|
|
|
|
|
|
:return: new mesh vertex on index
|
|
|
|
%End
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual QgsMeshFace face( int index ) const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
|
|
|
Factory for mesh face with index
|
|
|
|
|
|
|
|
:return: new mesh face on index
|
|
|
|
%End
|
|
|
|
};
|
|
|
|
|
2018-05-09 15:03:21 +02:00
|
|
|
class QgsMeshDatasetSource /Abstract/
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Dataset is a collection of vector or scalar values on vertices or faces of the mesh
|
|
|
|
|
|
|
|
Base on the underlying data provider/format, whole dataset is either stored in memory or
|
|
|
|
read on demand
|
|
|
|
|
2018-05-10 18:56:08 -04:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
|
2018-05-09 15:03:21 +02:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmeshdataprovider.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
virtual ~QgsMeshDatasetSource();
|
|
|
|
|
|
|
|
virtual bool addDataset( const QString &uri ) = 0;
|
|
|
|
%Docstring
|
|
|
|
Associate dataset with the mesh
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual int datasetCount() const = 0;
|
|
|
|
%Docstring
|
|
|
|
Return number of datasets loaded
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool datasetHasScalarData( int index ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
Whether dataset has scalar data associated
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool datasetIsOnVertices( int index ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
Whether dataset is on vertices
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QgsMeshDatasetMetadata datasetMetadata( int index ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
Return dataset metadata
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QgsMeshDatasetValue datasetValue( int datasetIndex, int valueIndex ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
Return value associated with the index from the dataset
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool datasetIsValid( int index ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
Return whether dataset is valid
|
|
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMeshDataProvider: QgsDataProvider, QgsMeshSource, QgsMeshDatasetSource
|
2018-04-06 16:11:50 +02:00
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Base class for providing data for :py:class:`QgsMeshLayer`
|
|
|
|
|
|
|
|
Responsible for reading native mesh data
|
|
|
|
|
2018-05-10 18:56:08 -04:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
|
2018-04-06 16:11:50 +02:00
|
|
|
.. seealso:: :py:class:`QgsMeshSource`
|
2018-04-20 09:38:39 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2018-04-06 16:11:50 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmeshdataprovider.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsMeshDataProvider( const QString &uri = QString() );
|
|
|
|
%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 *
|
|
|
|
************************************************************************/
|