QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
qgsnativealgorithms.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsnativealgorithms.cpp
3  ---------------------
4  begin : April 2017
5  copyright : (C) 2017 by Nyall Dawson
6  email : nyall dot dawson 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 #include "qgsnativealgorithms.h"
23 #include "qgsalgorithmboundary.h"
25 #include "qgsalgorithmbuffer.h"
28 #include "qgsalgorithmcentroid.h"
29 #include "qgsalgorithmclip.h"
30 #include "qgsalgorithmconvexhull.h"
33 #include "qgsalgorithmdifference.h"
34 #include "qgsalgorithmdissolve.h"
35 #include "qgsalgorithmdrape.h"
38 #include "qgsalgorithmexplode.h"
51 #include "qgsalgorithmfilter.h"
54 #include "qgsalgorithmforcerhr.h"
55 #include "qgsalgorithmgrid.h"
65 #include "qgsalgorithmloadlayer.h"
67 #include "qgsalgorithmmergelines.h"
75 #include "qgsalgorithmpackage.h"
93 #include "qgsalgorithmrotate.h"
95 #include "qgsalgorithmsegmentize.h"
99 #include "qgsalgorithmsimplify.h"
100 #include "qgsalgorithmsmooth.h"
101 #include "qgsalgorithmsnaptogrid.h"
107 #include "qgsalgorithmsubdivide.h"
108 #include "qgsalgorithmswapxy.h"
111 #include "qgsalgorithmtransect.h"
112 #include "qgsalgorithmtransform.h"
113 #include "qgsalgorithmtranslate.h"
114 #include "qgsalgorithmunion.h"
116 #include "qgsalgorithmvectorize.h"
120 #include "qgsbookmarkalgorithms.h"
122 #include "qgsstylealgorithms.h"
123 
125 
127  : QgsProcessingProvider( parent )
128 {}
129 
130 QIcon QgsNativeAlgorithms::icon() const
131 {
132  return QgsApplication::getThemeIcon( QStringLiteral( "/providerQgis.svg" ) );
133 }
134 
135 QString QgsNativeAlgorithms::svgIconPath() const
136 {
137  return QgsApplication::iconPath( QStringLiteral( "providerQgis.svg" ) );
138 }
139 
140 QString QgsNativeAlgorithms::id() const
141 {
142  return QStringLiteral( "native" );
143 }
144 
145 QString QgsNativeAlgorithms::helpId() const
146 {
147  return QStringLiteral( "qgis" );
148 }
149 
150 QString QgsNativeAlgorithms::name() const
151 {
152  return tr( "QGIS (native c++)" );
153 }
154 
156 {
157  return true;
158 }
159 
161 {
162  addAlgorithm( new QgsAddIncrementalFieldAlgorithm() );
163  addAlgorithm( new QgsAddXYFieldsAlgorithm() );
164  addAlgorithm( new QgsAddUniqueValueIndexAlgorithm() );
165  addAlgorithm( new QgsArrayTranslatedFeaturesAlgorithm() );
166  addAlgorithm( new QgsAssignProjectionAlgorithm() );
167  addAlgorithm( new QgsBookmarksToLayerAlgorithm() );
168  addAlgorithm( new QgsBoundaryAlgorithm() );
169  addAlgorithm( new QgsBoundingBoxAlgorithm() );
170  addAlgorithm( new QgsBufferAlgorithm() );
171  addAlgorithm( new QgsCalculateVectorOverlapsAlgorithm() );
172  addAlgorithm( new QgsCategorizeUsingStyleAlgorithm() );
173  addAlgorithm( new QgsCentroidAlgorithm() );
174  addAlgorithm( new QgsClipAlgorithm() );
175  addAlgorithm( new QgsCollectAlgorithm() );
176  addAlgorithm( new QgsCombineStylesAlgorithm() );
177  addAlgorithm( new QgsConvexHullAlgorithm() );
178  addAlgorithm( new QgsDbscanClusteringAlgorithm() );
179  addAlgorithm( new QgsDifferenceAlgorithm() );
180  addAlgorithm( new QgsDissolveAlgorithm() );
181  addAlgorithm( new QgsDrapeToMAlgorithm() );
182  addAlgorithm( new QgsDrapeToZAlgorithm() );
183  addAlgorithm( new QgsDropGeometryAlgorithm() );
184  addAlgorithm( new QgsDropMZValuesAlgorithm() );
185  addAlgorithm( new QgsExplodeAlgorithm() );
186  addAlgorithm( new QgsExplodeHstoreAlgorithm() );
187  addAlgorithm( new QgsExtendLinesAlgorithm() );
188  addAlgorithm( new QgsExtentToLayerAlgorithm() );
189  addAlgorithm( new QgsExtractBinaryFieldAlgorithm() );
190  addAlgorithm( new QgsExtractByAttributeAlgorithm() );
191  addAlgorithm( new QgsExtractByExpressionAlgorithm() );
192  addAlgorithm( new QgsExtractByExtentAlgorithm() );
193  addAlgorithm( new QgsExtractByLocationAlgorithm() );
194  addAlgorithm( new QgsExtractMValuesAlgorithm() );
195  addAlgorithm( new QgsExtractVerticesAlgorithm() );
196  addAlgorithm( new QgsExtractZValuesAlgorithm() );
197  addAlgorithm( new QgsFileDownloaderAlgorithm() );
198  addAlgorithm( new QgsFilterAlgorithm() );
199  addAlgorithm( new QgsFilterVerticesByM() );
200  addAlgorithm( new QgsFilterVerticesByZ() );
201  addAlgorithm( new QgsFixGeometriesAlgorithm() );
202  addAlgorithm( new QgsForceRHRAlgorithm() );
203  addAlgorithm( new QgsGridAlgorithm() );
204  addAlgorithm( new QgsImportPhotosAlgorithm() );
205  addAlgorithm( new QgsInterpolatePointAlgorithm() );
206  addAlgorithm( new QgsIntersectionAlgorithm() );
207  addAlgorithm( new QgsJoinByAttributeAlgorithm() );
208  addAlgorithm( new QgsJoinByNearestAlgorithm() );
209  addAlgorithm( new QgsJoinWithLinesAlgorithm() );
210  addAlgorithm( new QgsKMeansClusteringAlgorithm() );
211  addAlgorithm( new QgsLayerToBookmarksAlgorithm() );
212  addAlgorithm( new QgsLayoutMapExtentToLayerAlgorithm() );
213  addAlgorithm( new QgsLineIntersectionAlgorithm() );
214  addAlgorithm( new QgsLineSubstringAlgorithm() );
215  addAlgorithm( new QgsLoadLayerAlgorithm() );
216  addAlgorithm( new QgsMeanCoordinatesAlgorithm() );
217  addAlgorithm( new QgsMergeLinesAlgorithm() );
218  addAlgorithm( new QgsMergeVectorAlgorithm() );
219  addAlgorithm( new QgsMinimumEnclosingCircleAlgorithm() );
220  addAlgorithm( new QgsMultipartToSinglepartAlgorithm() );
221  addAlgorithm( new QgsMultiRingConstantBufferAlgorithm() );
222  addAlgorithm( new QgsOffsetLinesAlgorithm() );
223  addAlgorithm( new QgsOrderByExpressionAlgorithm() );
224  addAlgorithm( new QgsOrientedMinimumBoundingBoxAlgorithm() );
225  addAlgorithm( new QgsPackageAlgorithm() );
226  addAlgorithm( new QgsCreateArrayOffsetLinesAlgorithm() );
227  addAlgorithm( new QgsPointOnSurfaceAlgorithm() );
228  addAlgorithm( new QgsPointToLayerAlgorithm() );
229  addAlgorithm( new QgsPointsAlongGeometryAlgorithm() );
230  addAlgorithm( new QgsProjectPointCartesianAlgorithm() );
231  addAlgorithm( new QgsPromoteToMultipartAlgorithm() );
232  addAlgorithm( new QgsRasterLayerUniqueValuesReportAlgorithm() );
233  addAlgorithm( new QgsRasterLayerZonalStatsAlgorithm() );
234  addAlgorithm( new QgsRasterLogicalAndAlgorithm() );
235  addAlgorithm( new QgsRasterLogicalOrAlgorithm() );
236  addAlgorithm( new QgsRasterPixelsToPointsAlgorithm() );
237  addAlgorithm( new QgsRasterPixelsToPolygonsAlgorithm() );
238  addAlgorithm( new QgsRasterSurfaceVolumeAlgorithm() );
239  addAlgorithm( new QgsAlgorithmRemoveDuplicateVertices() );
240  addAlgorithm( new QgsReclassifyByLayerAlgorithm() );
241  addAlgorithm( new QgsReclassifyByTableAlgorithm() );
242  addAlgorithm( new QgsRemoveDuplicatesByAttributeAlgorithm() );
243  addAlgorithm( new QgsRemoveHolesAlgorithm() );
244  addAlgorithm( new QgsRemoveNullGeometryAlgorithm() );
245  addAlgorithm( new QgsRenameLayerAlgorithm() );
246  addAlgorithm( new QgsReverseLineDirectionAlgorithm() );
247  addAlgorithm( new QgsRotateFeaturesAlgorithm() );
248  addAlgorithm( new QgsSaveSelectedFeatures() );
249  addAlgorithm( new QgsSegmentizeByMaximumAngleAlgorithm() );
250  addAlgorithm( new QgsSegmentizeByMaximumDistanceAlgorithm() );
251  addAlgorithm( new QgsSelectByLocationAlgorithm() );
252  addAlgorithm( new QgsShortestPathLayerToPointAlgorithm() );
253  addAlgorithm( new QgsShortestPathPointToLayerAlgorithm() );
254  addAlgorithm( new QgsShortestPathPointToPointAlgorithm() );
255  addAlgorithm( new QgsSimplifyAlgorithm() );
256  addAlgorithm( new QgsSmoothAlgorithm() );
257  addAlgorithm( new QgsSnapToGridAlgorithm() );
258  addAlgorithm( new QgsSplitFeaturesByAttributeCharacterAlgorithm() );
259  addAlgorithm( new QgsSplitGeometryAtAntimeridianAlgorithm() );
260  addAlgorithm( new QgsSplitLinesByLengthAlgorithm() );
261  addAlgorithm( new QgsSplitWithLinesAlgorithm() );
262  addAlgorithm( new QgsStringConcatenationAlgorithm() );
263  addAlgorithm( new QgsStyleFromProjectAlgorithm() );
264  addAlgorithm( new QgsSubdivideAlgorithm() );
265  addAlgorithm( new QgsSwapXYAlgorithm() );
266  addAlgorithm( new QgsSymmetricalDifferenceAlgorithm() );
267  addAlgorithm( new QgsTaperedBufferAlgorithm() );
268  addAlgorithm( new QgsTransectAlgorithm() );
269  addAlgorithm( new QgsTransformAlgorithm() );
270  addAlgorithm( new QgsTranslateAlgorithm() );
271  addAlgorithm( new QgsUnionAlgorithm() );
272  addAlgorithm( new QgsVariableWidthBufferByMAlgorithm() );
273  addAlgorithm( new QgsWedgeBuffersAlgorithm() );
274  addAlgorithm( new QgsZonalHistogramAlgorithm() );
275  addAlgorithm( new QgsPolygonsToLinesAlgorithm() );
276  addAlgorithm( new QgsDensifyGeometriesByIntervalAlgorithm() );
277 }
278 
279 
281 
282 
283 
QIcon icon() const override
Returns an icon for the provider.
QString id() const override
Returns the unique provider id, used for identifying the provider.
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
Abstract base class for processing providers.
QString helpId() const override
Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this pro...
void loadAlgorithms() override
Loads all algorithms belonging to this provider.
bool supportsNonFileBasedOutput() const override
Returns true if the provider supports non-file based outputs (such as memory layers or direct databas...
QString name() const override
Returns the provider name, which is used to describe the provider within the GUI. ...
bool addAlgorithm(QgsProcessingAlgorithm *algorithm)
Adds an algorithm to the provider.
QString svgIconPath() const override
Returns a path to an SVG version of the provider's icon.
QgsNativeAlgorithms(QObject *parent=nullptr)
Constructor for QgsNativeAlgorithms.