Feature request #15905

Updated by Giovanni Manghi almost 7 years ago

For the QgsGeometryAnalyzer buffer function, it would be useful to be able to specify the number of segments (for approximating arcs).

Number of segments is the second parameter to the QgsGeometry buffer function (that is used by QgsGeometryAnalyzer bufferFeature that is in turn used by QgsGeometryAnalyzer buffer). Current behaviour is to always use 5 for the segment parameter of QgsGeometry buffer.



It seems as if not many changes would need to be made in the code.



QgsGeometryAnalyzer::bufferFeature would need a new parameter ("segments"), and in the line

<pre>

bufferGeometry = featureGeometry.buffer( currentBufferDistance, 5 );

</pre>

"5" would have to be changed to "segments".



QgsGeometryAnalyzer::buffer would also need a new parameter ("segments"), and in the two lines

<pre>

bufferFeature( currentFeature, processedFeatures, &vWriter, dissolve, dissolveGeometry, bufferDistance, bufferDistanceField );

</pre>

the "segments" parameter would need to be added.



If the new "segments" parameter is optional and added as the last one, existing applications should not be affected.



If there is interest, I can try to create a pull request on github, but I guess there may be more to do then just what I have suggested above...

Back