QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsalgorithmwritevectortiles.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsalgorithmwritevectortiles.h
3 ---------------------
4 Date : April 2020
5 Copyright : (C) 2020 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSWRITEVECTORTILESALGORITHM_H
17#define QGSWRITEVECTORTILESALGORITHM_H
18
19
20#define SIP_NO_FILE
21
23
25
27
28
29class QgsWriteVectorTilesBaseAlgorithm : public QgsProcessingAlgorithm
30{
31 public:
32 QString group() const override;
33 QString groupId() const override;
34 QString shortHelpString() const override;
35
36 protected:
37 QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
38
39 void addBaseParameters();
40
41 virtual void prepareWriter( QgsVectorTileWriter &writer, const QVariantMap &parameters, QgsProcessingContext &context, QVariantMap &outputs ) = 0;
42};
43
44
45class QgsWriteVectorTilesXyzAlgorithm : public QgsWriteVectorTilesBaseAlgorithm
46{
47 public:
48 QString name() const override;
49 QString displayName() const override;
50
51 protected:
52 QgsProcessingAlgorithm *createInstance() const override;
53 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
54
55 void prepareWriter( QgsVectorTileWriter &writer, const QVariantMap &parameters, QgsProcessingContext &context, QVariantMap &outputs ) override;
56};
57
58
59class QgsWriteVectorTilesMbtilesAlgorithm : public QgsWriteVectorTilesBaseAlgorithm
60{
61 public:
62 QString name() const override;
63 QString displayName() const override;
64
65 protected:
66 QgsProcessingAlgorithm *createInstance() const override;
67 void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
68
69 void prepareWriter( QgsVectorTileWriter &writer, const QVariantMap &parameters, QgsProcessingContext &context, QVariantMap &outputs ) override;
70};
71
72
74
75#endif // QGSWRITEVECTORTILESALGORITHM_H
Abstract base class for processing algorithms.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
virtual QString shortHelpString() const
Returns a localised short helper string for the algorithm.
virtual QVariantMap processAlgorithm(const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback)=0
Runs the algorithm using the specified parameters.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
Takes care of writing vector tiles.