Feature request #15905

QgsGeometryAnalyzer, buffer: Allow specification of segments

Added by Håvard Tveite almost 7 years ago. Updated almost 6 years ago.

Pull Request or Patch supplied:Yes Resolution:wontfix
Easy fix?:No Copied to github as #:23822


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...


#2 Updated by Giovanni Manghi over 6 years ago

  • Easy fix? set to No

#3 Updated by Håvard Tveite over 6 years ago

If my pull request does not fix this, it would be nice if someone could explain what the problem is.

#4 Updated by Giovanni Manghi over 6 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Description updated (diff)

Try raise the problem directly in the PR or in the dev mailing list, thanks!

#5 Updated by Håvard Tveite over 6 years ago

Thanks. I have tried the dev list.

#6 Updated by Alexander Bruy over 6 years ago

This is not necessary/useful with upcomming Processing refactoring.

#7 Updated by Alexander Bruy almost 6 years ago

  • Status changed from Open to Closed

QgsGeometryAnalyzer was removed from analysis lib

#8 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to wontfix

Also available in: Atom PDF