QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
30 return mTemporalCapabilities.get();
35 return mTemporalCapabilities.get();
41 mTemporalCapabilities->setTemporalUnit( unit );
42 if ( oldUnit != unit )
59 const QVector<QgsMeshDataBlock> &datasetValues,
60 const QVector<QgsMeshDataBlock> &datasetActive,
61 const QVector<double> × )
64 QString filename = path;
66 QString driverName = QStringLiteral(
"DAT" );
67 QStringList parts = path.split(
':' );
68 if ( parts.size() > 1 )
70 driverName = parts[0];
72 filename = parts.join( QString() );
79 if ( index <
vertices.size() && index >= 0 )
86 if ( index <
faces.size() && index >= 0 )
93 if ( index <
edges.size() && index >= 0 )
109 case ElementType::Vertex:
111 case ElementType::Edge:
112 return !
edges.isEmpty();
114 return !
faces.isEmpty();
138 case QgsMesh::ElementType::Vertex:
140 case QgsMesh::ElementType::Edge:
virtual int datasetCount(int groupIndex) const =0
Returns number of datasets loaded in the group.
Setting options for creating vector data providers.
Point geometry type, with support for z-dimension and m-values.
QgsPoint QgsMeshVertex
xyz coords of vertex
bool contains(const QgsMesh::ElementType &type) const
Returns whether the mesh contains at mesh elements of given type.
TemporalUnit
Temporal units.
QVector< QgsMeshEdge > edges
QgsMeshDataProvider(const QString &uri, const QgsDataProvider::ProviderOptions &providerOptions)
Ctor.
QgsMeshDataProviderTemporalCapabilities * temporalCapabilities() override
Returns the provider's temporal capabilities.
virtual QgsMeshDataBlock datasetValues(QgsMeshDatasetIndex index, int valueIndex, int count) const =0
Returns N vector/scalar values from the index from the dataset.
virtual void reloadData()
Reloads the data from the source by calling reloadProviderData() implemented by providers with data c...
int faceCount() const
Returns number of faces.
int group() const
Returns a group index.
int vertexCount() const
Returns number of vertices.
ElementType
Defines type of mesh elements.
QVector< QgsMeshFace > faces
int edgeCount() const
Returns number of edge.
QgsMeshEdge edge(int index) const
Returns an edge at the index.
virtual Q_DECL_DEPRECATED bool persistDatasetGroup(const QString &path, const QgsMeshDatasetGroupMetadata &meta, const QVector< QgsMeshDataBlock > &datasetValues, const QVector< QgsMeshDataBlock > &datasetActive, const QVector< double > ×)
Creates a new dataset group from a data and persists it into a destination path.
void setTemporalUnit(QgsUnitTypes::TemporalUnit unit)
Sets the temporal unit of the provider and reload data if it changes.
QgsMeshFace face(int index) const
Returns a face at the index.
virtual int edgeCount() const =0
Returns number of edges in the native mesh.
virtual int vertexCount() const =0
Returns number of vertices in the native mesh.
QVector< int > QgsMeshFace
List of vertex indexes.
void clear()
Remove all vertices, edges and faces.
virtual int faceCount() const =0
Returns number of faces in the native mesh.
bool contains(const ElementType &type) const
Returns whether the mesh contains at mesh elements of given type.
QPair< int, int > QgsMeshEdge
Edge is a straight line seqment between 2 points.
QVector< QgsMeshVertex > vertices
QgsMeshVertex vertex(int index) const
Returns a vertex at the index.
virtual QgsMeshDatasetGroupMetadata datasetGroupMetadata(int groupIndex) const =0
Returns dataset group metadata.