Feature request #15905
QgsGeometryAnalyzer, buffer: Allow specification of segments
|Assigned to:||-||% Done:||
|Target version:||Version 3.0||Estimated time:||0.50 hour|
|Platform version:||Pull Request or Patch supplied:||No|
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
bufferGeometry = featureGeometry.buffer( currentBufferDistance, 5 );
"5" would have to be changed to "segments".
QgsGeometryAnalyzer::buffer would also need a new parameter ("segments"), and in the two lines
bufferFeature( currentFeature, processedFeatures, &vWriter, dissolve, dissolveGeometry, bufferDistance, bufferDistanceField );
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...
Also available in: Atom