Skip to content
Permalink
Browse files

[processing] evaluate dynamic parameters before processing feature

  • Loading branch information
alexbruy committed Mar 2, 2018
1 parent 5daa8fd commit 669beac8242b0e215424ef2f85ac9b6d867420ab
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/analysis/processing/qgsalgorithmmultiringbuffer.cpp
@@ -106,12 +106,20 @@ QgsFeatureList QgsMultiRingBufferAlgorithm::processFeature( const QgsFeature &fe
double currentDistance = 0;
QgsGeometry outputGeometry, previousGeometry;

int rings = mRingsNumber;
if ( mDynamicRingsNumber )
rings = mRingsNumberProperty.valueAsInt( context.expressionContext(), rings );

double distance = mDistance;
if ( mDynamicDistance )
distance = mDistanceProperty.valueAsDouble( context.expressionContext(), distance );

QgsFeatureList outputs;

for ( int i = 1; i <= mRingsNumber; ++i )
{
QgsFeature out;
currentDistance = i * mDistance;
currentDistance = i * distance;
outputGeometry = feature.geometry().buffer( currentDistance, 40 );
if ( !outputGeometry )
{

0 comments on commit 669beac

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