1 /*************************************************************************** 2 qgsalgorithmtinmeshcreation.h 3 --------------------------- 4 begin : August 2020 5 copyright : (C) 2020 by Vincent Cloarec 6 email : vcloarec at gmail dot com 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef QGSALGORITHMTINMESHCREATION_H 19 #define QGSALGORITHMTINMESHCREATION_H 20 21 #define SIP_NO_FILE 22 23 #include "qgsprocessingalgorithm.h" 24 25 ///@cond PRIVATE 26 struct QgsMesh; 27 28 class QgsTinMeshCreationAlgorithm: public QgsProcessingAlgorithm 29 { 30 public: 31 32 QString group() const override; 33 QString groupId() const override; 34 QString shortHelpString() const override; 35 QString shortDescription() const override; 36 QString name() const override; 37 QString displayName() const override; 38 bool canExecute( QString *errorMessage ) const override; 39 40 protected: 41 QgsProcessingAlgorithm *createInstance() const override; 42 43 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override; 44 bool prepareAlgorithm( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override; 45 QVariantMap processAlgorithm( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override; 46 47 private: 48 QStringList mAvailableFormat; 49 QMap<QString, QString> mDriverSuffix; 50 51 struct Layer 52 { 53 QgsFeatureIterator fit; 54 QgsCoordinateTransform transform; 55 int attributeIndex; 56 long long featureCount; 57 }; 58 59 QList<Layer> mVerticesLayer; 60 QList<Layer> mBreakLinesLayer; 61 62 void addZValueDataset( const QString &fileName, const QgsMesh &mesh, const QString &driver ); 63 }; 64 65 ///@endcond PRIVATE 66 67 #endif // QGSALGORITHMTINMESHCREATION_H 68