34struct QgsMeshLayerRendererCache;
115 : transformContext( transformContext )
127 bool loadDefaultStyle =
true;
142 bool skipCrsValidation =
false;
158 explicit QgsMeshLayer(
const QString &path = QString(),
const QString &baseName = QString(),
const QString &providerLib = QStringLiteral(
"mesh_memory" ),
169 SIP_PYOBJECT __repr__();
171 QString
str = QStringLiteral(
"<QgsMeshLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral(
"Invalid" ) );
172 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
182 bool readSymbology( const QDomNode &node, QString &errorMessage,
184 bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
186 bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const
QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const override;
187 bool readStyle( const QDomNode &node, QString &errorMessage,
QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) override;
188 QString encodedSource( const QString &source, const
QgsReadWriteContext &context ) const override;
189 QString decodedSource( const QString &source, const QString &provider, const
QgsReadWriteContext &context ) const override;
191 bool writeXml( QDomNode &layer_node, QDomDocument &doc, const
QgsReadWriteContext &context ) const override;
194 void reload() override;
195 QStringList subLayers() const override;
196 QString htmlMetadata() const override;
197 bool isEditable() const override;
198 bool supportsEditing() const override;
199 QString loadDefaultStyle(
bool &resultFlag
SIP_OUT )
FINAL;
202 QString providerType() const;
213 bool addDatasets( const QString &path, const QDateTime &defaultReferenceTime = QDateTime() );
235 bool saveDataset( const QString &path,
int datasetGroupIndex, QString driver );
271 int triangularMeshLevelOfDetailCount() const
SIP_SKIP;
299 QgsMeshLayerRendererCache *rendererCache()
SIP_SKIP;
340 QString formatTime(
double hours );
347 int datasetGroupCount() const;
354 int extraDatasetGroupCount() const;
364 QList<
int> datasetGroupsIndexes() const;
374 QList<
int> enabledDatasetGroupsIndexes() const;
571 QgsMeshDatasetIndex datasetIndexAtTime( const QgsDateTimeRange &timeRange,
int datasetGroupIndex ) const;
671 void setReferenceTime( const QDateTime &referenceTime );
713 QList<
int> selectVerticesByExpression(
QgsExpression expression );
723 QList<
int> selectFacesByExpression(
QgsExpression expression );
754 void resetDatasetGroupTreeItem();
851 bool isModified() const override;
857 bool contains( const
QgsMesh::ElementType &type ) const;
866 int meshVertexCount() const;
875 int meshFaceCount() const;
882 int meshEdgeCount() const;
900 void activeScalarDatasetGroupChanged(
int index );
907 void activeVectorDatasetGroupChanged(
int index );
914 void timeSettingsChanged();
928 bool isReadOnly()
const override {
return true;}
936 bool setDataProvider( QString
const &provider,
const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
942 void fillNativeMesh();
943 void assignDefaultStyleToDatasetGroup(
int groupIndex );
944 void createSimplifiedMeshes();
945 int levelsOfDetailsIndex(
double partOfMeshInView )
const;
947 bool hasSimplifiedMeshes()
const;
953 void onDatasetGroupsAdded(
const QList<int> &datasetGroupIndexes );
961 QStringList mExtraDatasetUri;
963 std::unique_ptr<QgsMeshDatasetGroupStore> mDatasetGroupStore;
966 std::unique_ptr<QgsMesh> mNativeMesh;
969 std::vector<std::unique_ptr<QgsTriangularMesh>> mTriangularMeshes;
972 std::unique_ptr<QgsMeshLayerRendererCache> mRendererCache;
989 int mStaticScalarDatasetIndex = 0;
990 int mStaticVectorDatasetIndex = 0;
994 int closestEdge(
const QgsPointXY &point,
double searchRadius,
QgsPointXY &projectedPoint )
const;
1005 void updateActiveDatasetGroups();
1007 void checkSymbologyConsistency();
1009 void setDataSourcePrivate(
const QString &dataSource,
const QString &baseName,
const QString &provider,
Abstract base class for objects which generate elevation profiles.
Interface for classes which can generate elevation profiles.
Contains information about the context in which a coordinate transform is executed.
Class for parsing and evaluation of expressions (formerly called "search strings").
A representation of the interval between two datetime values.
Base class for storage of map layer elevation properties.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Base class for storage of map layer temporal properties.
Base class for all map layer types.
virtual Q_INVOKABLE QgsDataProvider * dataProvider()
Returns the layer's data provider, it may be nullptr.
Abstract class to interpolate 3d stacked mesh data to 2d data.
QgsMesh3dDataBlock is a block of 3d stacked mesh data related N faces defined on base mesh frame.
QgsMeshDataBlock is a block of integers/doubles that can be used to retrieve: active flags (e....
Class for handling properties relating to a mesh data provider's temporal capabilities.
Base class for providing data for QgsMeshLayer.
Class used to register and access all the dataset groups related to a mesh layer.
Tree item for display of the mesh dataset groups.
Abstract class that represents a dataset group.
QgsMeshDatasetIndex is index that identifies the dataset group (e.g.
QgsMeshDatasetValue represents single dataset value.
Class that represents an error during mesh editing.
Class that makes edit operation on a mesh.
Mesh layer specific subclass of QgsMapLayerElevationProperties.
Implementation of map layer temporal properties for mesh layers.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
QgsMeshLayer & operator=(QgsMeshLayer const &rhs)=delete
QgsMeshLayer cannot be copied.
QgsMeshLayer(const QgsMeshLayer &rhs)=delete
QgsMeshLayer cannot be copied.
Represents a mesh renderer settings for scalar datasets.
Represents all mesh renderer settings.
Represents an overview renderer settings.
Represents a mesh time settings for mesh datasets.
A class to represent a 2D point.
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
Triangular/Derived Mesh is mesh with vertices in map coordinates.
TemporalUnit
Temporal units.
Setting options for creating vector data providers.
Setting options for loading mesh layers.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
LayerOptions(const QgsCoordinateTransformContext &transformContext=QgsCoordinateTransformContext())
Constructor for LayerOptions with optional transformContext.
Mesh - vertices, edges and faces.