Skip to content

Commit

Permalink
Update algorithms for new API
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 2, 2017
1 parent 8695893 commit d1a71f0
Show file tree
Hide file tree
Showing 59 changed files with 60 additions and 69 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/AddTableField.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/DeleteColumn.py
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/DeleteHoles.py
Expand Up @@ -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
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/DensifyGeometries.py
Expand Up @@ -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)
Expand Down
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/ExtendLines.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/FieldsMapper.py
Expand Up @@ -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)
Expand Down
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/LinesToPolygons.py
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/OffsetLine.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Orthogonalize.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PointOnSurface.py
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PolygonsToLines.py
Expand Up @@ -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
Expand Down
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/SetMValue.py
Expand Up @@ -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()
Expand Down
11 changes: 2 additions & 9 deletions python/plugins/processing/algs/qgis/SetZValue.py
Expand Up @@ -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'
Expand Down Expand Up @@ -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()
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/SingleSidedBuffer.py
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/TextToFloat.py
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/3d/processing/qgsalgorithmtessellate.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/3d/processing/qgsalgorithmtessellate.h
Expand Up @@ -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;

};

Expand Down
Expand Up @@ -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() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmaddincrementalfield.h
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmassignprojection.cpp
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmassignprojection.h
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmboundary.cpp
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmboundary.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmboundingbox.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmboundingbox.h
Expand Up @@ -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;

};

Expand Down
4 changes: 1 addition & 3 deletions src/analysis/processing/qgsalgorithmbuffer.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmcentroid.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmcentroid.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmconvexhull.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmconvexhull.h
Expand Up @@ -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;

};

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmdropgeometry.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmdropgeometry.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmdropmzvalues.cpp
Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmdropmzvalues.h
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmfixgeometries.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmfixgeometries.h
Expand Up @@ -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;

};

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmmergelines.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmmergelines.h
Expand Up @@ -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;

};

Expand Down

0 comments on commit d1a71f0

Please sign in to comment.