Skip to content
Permalink
Browse files

Update algorithms for new API

  • Loading branch information
nyalldawson committed Dec 2, 2017
1 parent 8695893 commit d1a71f097124698ffd2f25fc6979c5d725aed748
Showing with 60 additions and 69 deletions.
  1. +1 −1 python/plugins/processing/algs/qgis/AddTableField.py
  2. +1 −1 python/plugins/processing/algs/qgis/DeleteColumn.py
  3. +1 −1 python/plugins/processing/algs/qgis/DeleteHoles.py
  4. +1 −1 python/plugins/processing/algs/qgis/DensifyGeometries.py
  5. +1 −1 python/plugins/processing/algs/qgis/DensifyGeometriesInterval.py
  6. +1 −1 python/plugins/processing/algs/qgis/ExtendLines.py
  7. +1 −1 python/plugins/processing/algs/qgis/FieldsMapper.py
  8. +1 −1 python/plugins/processing/algs/qgis/GeometryByExpression.py
  9. +1 −1 python/plugins/processing/algs/qgis/LinesToPolygons.py
  10. +1 −1 python/plugins/processing/algs/qgis/OffsetLine.py
  11. +1 −1 python/plugins/processing/algs/qgis/Orthogonalize.py
  12. +1 −1 python/plugins/processing/algs/qgis/PointOnSurface.py
  13. +1 −1 python/plugins/processing/algs/qgis/PolygonsToLines.py
  14. +1 −1 python/plugins/processing/algs/qgis/ReverseLineDirection.py
  15. +1 −1 python/plugins/processing/algs/qgis/SetMValue.py
  16. +2 −9 python/plugins/processing/algs/qgis/SetZValue.py
  17. +1 −1 python/plugins/processing/algs/qgis/SingleSidedBuffer.py
  18. +1 −1 python/plugins/processing/algs/qgis/TextToFloat.py
  19. +1 −1 src/3d/processing/qgsalgorithmtessellate.cpp
  20. +1 −1 src/3d/processing/qgsalgorithmtessellate.h
  21. +1 −1 src/analysis/processing/qgsalgorithmaddincrementalfield.cpp
  22. +1 −1 src/analysis/processing/qgsalgorithmaddincrementalfield.h
  23. +1 −1 src/analysis/processing/qgsalgorithmassignprojection.cpp
  24. +1 −1 src/analysis/processing/qgsalgorithmassignprojection.h
  25. +1 −1 src/analysis/processing/qgsalgorithmboundary.cpp
  26. +1 −1 src/analysis/processing/qgsalgorithmboundary.h
  27. +1 −1 src/analysis/processing/qgsalgorithmboundingbox.cpp
  28. +1 −1 src/analysis/processing/qgsalgorithmboundingbox.h
  29. +1 −3 src/analysis/processing/qgsalgorithmbuffer.cpp
  30. +1 −1 src/analysis/processing/qgsalgorithmcentroid.cpp
  31. +1 −1 src/analysis/processing/qgsalgorithmcentroid.h
  32. +1 −1 src/analysis/processing/qgsalgorithmconvexhull.cpp
  33. +1 −1 src/analysis/processing/qgsalgorithmconvexhull.h
  34. +1 −1 src/analysis/processing/qgsalgorithmdropgeometry.cpp
  35. +1 −1 src/analysis/processing/qgsalgorithmdropgeometry.h
  36. +1 −1 src/analysis/processing/qgsalgorithmdropmzvalues.cpp
  37. +1 −1 src/analysis/processing/qgsalgorithmdropmzvalues.h
  38. +1 −1 src/analysis/processing/qgsalgorithmfixgeometries.cpp
  39. +1 −1 src/analysis/processing/qgsalgorithmfixgeometries.h
  40. +1 −1 src/analysis/processing/qgsalgorithmmergelines.cpp
  41. +1 −1 src/analysis/processing/qgsalgorithmmergelines.h
  42. +1 −1 src/analysis/processing/qgsalgorithmminimumenclosingcircle.cpp
  43. +1 −1 src/analysis/processing/qgsalgorithmminimumenclosingcircle.h
  44. +1 −1 src/analysis/processing/qgsalgorithmorientedminimumboundingbox.cpp
  45. +1 −1 src/analysis/processing/qgsalgorithmorientedminimumboundingbox.h
  46. +1 −1 src/analysis/processing/qgsalgorithmpromotetomultipart.cpp
  47. +1 −1 src/analysis/processing/qgsalgorithmpromotetomultipart.h
  48. +1 −1 src/analysis/processing/qgsalgorithmsimplify.cpp
  49. +1 −1 src/analysis/processing/qgsalgorithmsimplify.h
  50. +1 −1 src/analysis/processing/qgsalgorithmsmooth.cpp
  51. +1 −1 src/analysis/processing/qgsalgorithmsmooth.h
  52. +1 −1 src/analysis/processing/qgsalgorithmsnaptogrid.cpp
  53. +1 −1 src/analysis/processing/qgsalgorithmsnaptogrid.h
  54. +1 −1 src/analysis/processing/qgsalgorithmsubdivide.cpp
  55. +1 −1 src/analysis/processing/qgsalgorithmsubdivide.h
  56. +1 −1 src/analysis/processing/qgsalgorithmtransform.cpp
  57. +1 −1 src/analysis/processing/qgsalgorithmtransform.h
  58. +1 −1 src/analysis/processing/qgsalgorithmtranslate.cpp
  59. +1 −1 src/analysis/processing/qgsalgorithmtranslate.h
@@ -90,7 +90,7 @@ def outputFields(self, inputFields):
inputFields.append(self.field)
return inputFields

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
attributes = feature.attributes()
attributes.append(None)
feature.setAttributes(attributes)
@@ -80,7 +80,7 @@ def outputFields(self, input_fields):
input_fields.remove(index)
return input_fields

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
attributes = feature.attributes()
for index in self.field_indices:
del attributes[index]
@@ -66,7 +66,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.min_area = -1.0
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
if feature.hasGeometry():
feature.setGeometry(feature.geometry().removeInteriorRings(self.min_area))
return feature
@@ -68,7 +68,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.vertices = self.parameterAsInt(parameters, self.VERTICES, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
if feature.hasGeometry():
new_geometry = feature.geometry().densifyByCount(self.vertices)
feature.setGeometry(new_geometry)
@@ -64,7 +64,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
interval = self.parameterAsDouble(parameters, self.INTERVAL, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
if feature.hasGeometry():
new_geometry = feature.geometry().densifyByDistance(float(interval))
feature.setGeometry(new_geometry)
@@ -67,7 +67,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.end_distance = self.parameterAsDouble(parameters, self.END_DISTANCE, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
output_geometry = input_geometry.extendLine(self.start_distance, self.end_distance)
@@ -151,7 +151,7 @@ def processAlgorithm(self, parameters, context, feeback):
self._row_number = 0
return super().processAlgorithm(parameters, context, feeback)

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
attributes = []
for expression in self.expressions:
self.expr_context.setFeature(feature)
@@ -101,7 +101,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
def outputWkbType(self, input_wkb_type):
return self.wkb_type

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
self.expression_context.setFeature(feature)
value = self.expression.evaluate(self.expression_context)
if self.expression.hasEvalError():
@@ -80,7 +80,7 @@ def inputLayerTypes(self):
def outputWkbType(self, input_wkb_type):
return self.convertWkbToPolygons(input_wkb_type)

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
if feature.hasGeometry():
feature.setGeometry(QgsGeometry(self.convertToPolygons(feature.geometry())))
if feature.geometry().isEmpty():
@@ -100,7 +100,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.miter_limit = self.parameterAsDouble(parameters, self.MITER_LIMIT, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
output_geometry = input_geometry.offsetCurve(self.distance, self.segments, self.join_style, self.miter_limit)
@@ -79,7 +79,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.angle_tolerance = self.parameterAsDouble(parameters, self.ANGLE_TOLERANCE, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
output_geometry = input_geometry.orthogonalize(1.0e-8, self.max_iterations, self.angle_tolerance)
@@ -64,7 +64,7 @@ def outputType(self):
def outputWkbType(self, input_wkb_type):
return QgsWkbTypes.Point

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
output_geometry = input_geometry.pointOnSurface()
@@ -73,7 +73,7 @@ def inputLayerTypes(self):
def outputWkbType(self, input_wkb_type):
return self.convertWkbToLines(input_wkb_type)

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
if feature.hasGeometry():
feature.setGeometry(QgsGeometry(self.convertToLines(feature.geometry())))
return feature
@@ -54,7 +54,7 @@ def outputType(self):
def inputLayerTypes(self):
return [QgsProcessing.TypeVectorLine]

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
if feature.geometry():
inGeom = feature.geometry()
reversedLine = inGeom.constGet().reversed()
@@ -71,7 +71,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.m_value = self.parameterAsDouble(parameters, self.M_VALUE, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
new_geom = input_geometry.constGet().clone()
@@ -52,7 +52,6 @@ def __init__(self):
self.z_value = 0
self.dynamic_z = False
self.z_property = None
self.expression_context = None

def name(self):
return 'setzvalue'
@@ -82,14 +81,9 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.dynamic_z = QgsProcessingParameters.isDynamic(parameters, self.Z_VALUE)
if self.dynamic_z:
self.z_property = parameters[self.Z_VALUE]
source = self.parameterAsSource(parameters, 'INPUT', context)
if not isinstance(source, QgsProcessingFeatureSource):
source = None
self.expression_context = self.createExpressionContext(parameters, context, source)
self.z_property.prepare(self.expression_context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
new_geom = input_geometry.constGet().clone()
@@ -99,8 +93,7 @@ def processFeature(self, feature, feedback):

z = self.z_value
if self.dynamic_z:
self.expression_context.setFeature(feature)
z, ok = self.z_property.valueAsDouble(self.expression_context, z)
z, ok = self.z_property.valueAsDouble(context.expressionContext(), z)
new_geom.addZValue(z)

feature.setGeometry(QgsGeometry(new_geom))
@@ -108,7 +108,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.miter_limit = self.parameterAsDouble(parameters, self.MITER_LIMIT, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
input_geometry = feature.geometry()
if input_geometry:
output_geometry = input_geometry.singleSidedBuffer(self.distance, self.segments,
@@ -73,7 +73,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.field_name = self.parameterAsString(parameters, self.FIELD, context)
return True

def processFeature(self, feature, feedback):
def processFeature(self, feature, context, feedback):
value = feature[self.field_idx]
try:
if '%' in value:
@@ -74,7 +74,7 @@ QgsTessellateAlgorithm *QgsTessellateAlgorithm::createInstance() const
return new QgsTessellateAlgorithm();
}

QgsFeature QgsTessellateAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsTessellateAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
{
QgsFeature f = feature;
if ( f.hasGeometry() )
@@ -47,7 +47,7 @@ class QgsTessellateAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QgsProcessing::SourceType outputLayerType() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override;

QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

};

@@ -90,7 +90,7 @@ bool QgsAddIncrementalFieldAlgorithm::prepareAlgorithm( const QVariantMap &param
return true;
}

QgsFeature QgsAddIncrementalFieldAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsAddIncrementalFieldAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
{
if ( !mGroupedFieldNames.empty() && mGroupedFields.empty() )
{
@@ -49,7 +49,7 @@ class QgsAddIncrementalFieldAlgorithm : public QgsProcessingFeatureBasedAlgorith
QgsFields outputFields( const QgsFields &inputFields ) const override;

bool prepareAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

private:

@@ -68,7 +68,7 @@ bool QgsAssignProjectionAlgorithm::prepareAlgorithm( const QVariantMap &paramete
return true;
}

QgsFeature QgsAssignProjectionAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsAssignProjectionAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
{
return feature;
}
@@ -48,7 +48,7 @@ class QgsAssignProjectionAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;

bool prepareAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

private:

@@ -90,7 +90,7 @@ QgsWkbTypes::Type QgsBoundaryAlgorithm::outputWkbType( QgsWkbTypes::Type inputWk
return outputWkb;
}

QgsFeature QgsBoundaryAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback )
QgsFeature QgsBoundaryAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback *feedback )
{
QgsFeature outFeature = feature;

@@ -46,7 +46,7 @@ class QgsBoundaryAlgorithm : public QgsProcessingFeatureBasedAlgorithm

QString outputName() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
};

///@endcond PRIVATE
@@ -66,7 +66,7 @@ QgsFields QgsBoundingBoxAlgorithm::outputFields( const QgsFields &inputFields )
return fields;
}

QgsFeature QgsBoundingBoxAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsBoundingBoxAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
{
QgsFeature f = feature;
if ( f.hasGeometry() )
@@ -45,7 +45,7 @@ class QgsBoundingBoxAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type ) const override { return QgsWkbTypes::Polygon; }
QgsFields outputFields( const QgsFields &inputFields ) const override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

};

@@ -91,13 +91,11 @@ QVariantMap QgsBufferAlgorithm::processAlgorithm( const QVariantMap &parameters,
double miterLimit = parameterAsDouble( parameters, QStringLiteral( "MITER_LIMIT" ), context );
double bufferDistance = parameterAsDouble( parameters, QStringLiteral( "DISTANCE" ), context );
bool dynamicBuffer = QgsProcessingParameters::isDynamic( parameters, QStringLiteral( "DISTANCE" ) );
QgsExpressionContext expressionContext;
QgsExpressionContext expressionContext = createExpressionContext( parameters, context, dynamic_cast< QgsProcessingFeatureSource * >( source.get() ) );
QgsProperty bufferProperty;
if ( dynamicBuffer )
{
bufferProperty = parameters.value( QStringLiteral( "DISTANCE" ) ).value< QgsProperty >();
expressionContext = createExpressionContext( parameters, context, dynamic_cast< QgsProcessingFeatureSource * >( source.get() ) );
bufferProperty.prepare( expressionContext );
}

long count = source->featureCount();
@@ -61,7 +61,7 @@ QgsCentroidAlgorithm *QgsCentroidAlgorithm::createInstance() const
return new QgsCentroidAlgorithm();
}

QgsFeature QgsCentroidAlgorithm::processFeature( const QgsFeature &f, QgsProcessingFeedback *feedback )
QgsFeature QgsCentroidAlgorithm::processFeature( const QgsFeature &f, QgsProcessingContext &, QgsProcessingFeedback *feedback )
{
QgsFeature feature = f;
if ( feature.hasGeometry() )
@@ -48,7 +48,7 @@ class QgsCentroidAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QgsProcessing::SourceType outputLayerType() const override { return QgsProcessing::TypeVectorPoint; }
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override { Q_UNUSED( inputWkbType ); return QgsWkbTypes::Point; }

QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
};

///@endcond PRIVATE
@@ -64,7 +64,7 @@ QgsFields QgsConvexHullAlgorithm::outputFields( const QgsFields &inputFields ) c
return fields;
}

QgsFeature QgsConvexHullAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback )
QgsFeature QgsConvexHullAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback *feedback )
{
QgsFeature f = feature;
if ( f.hasGeometry() )
@@ -46,7 +46,7 @@ class QgsConvexHullAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type ) const override { return QgsWkbTypes::Polygon; }
QgsFields outputFields( const QgsFields &inputFields ) const override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

};

@@ -69,7 +69,7 @@ QgsFeatureRequest QgsDropGeometryAlgorithm::request() const
return QgsFeatureRequest().setFlags( QgsFeatureRequest::NoGeometry );
}

QgsFeature QgsDropGeometryAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsDropGeometryAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
{
QgsFeature f = feature;
f.clearGeometry();
@@ -47,7 +47,7 @@ class QgsDropGeometryAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override;
QgsFeatureRequest request() const override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
};

///@endcond PRIVATE
@@ -77,7 +77,7 @@ bool QgsDropMZValuesAlgorithm::prepareAlgorithm( const QVariantMap &parameters,
return true;
}

QgsFeature QgsDropMZValuesAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback * )
QgsFeature QgsDropMZValuesAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback * )
{
QgsFeature f = feature;
if ( f.hasGeometry() )
@@ -47,7 +47,7 @@ class QgsDropMZValuesAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const override;
bool prepareAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

private:

@@ -67,7 +67,7 @@ QgsFixGeometriesAlgorithm *QgsFixGeometriesAlgorithm::createInstance() const
return new QgsFixGeometriesAlgorithm();
}

QgsFeature QgsFixGeometriesAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback )
QgsFeature QgsFixGeometriesAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback *feedback )
{
if ( !feature.hasGeometry() )
return feature;
@@ -45,7 +45,7 @@ class QgsFixGeometriesAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QgsProcessingFeatureSource::Flag sourceFlags() const override;
QString outputName() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type type ) const override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

};

@@ -71,7 +71,7 @@ QgsMergeLinesAlgorithm *QgsMergeLinesAlgorithm::createInstance() const
return new QgsMergeLinesAlgorithm();
}

QgsFeature QgsMergeLinesAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback )
QgsFeature QgsMergeLinesAlgorithm::processFeature( const QgsFeature &feature, QgsProcessingContext &, QgsProcessingFeedback *feedback )
{
if ( !feature.hasGeometry() )
return feature;
@@ -50,7 +50,7 @@ class QgsMergeLinesAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;
QgsProcessing::SourceType outputLayerType() const override;
QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type ) const override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingFeedback *feedback ) override;
QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

};

0 comments on commit d1a71f0

Please sign in to comment.
You can’t perform that action at this time.