Is there any method generating a wedge buffer, as in Creating wedge buffers from many to one in QGIS, using QGIS Python API?

I made a search in QGIS API Documentation and GIS SE.

I'm not looking for a script, only a useful function to generate a wedge buffer for a point.

  • The trigonometry for making a "buffer" that shape from a given point, distances, and angles isn't that hard, so you could code it in Python from scratch.
    – Spacedman
    Commented Sep 25, 2021 at 12:01
  • @Spacedman I needed a quick solution now. I will probably need my own wedge buffer function that has different properties. Thank you. Commented Sep 25, 2021 at 15:18

1 Answer 1


Yes. Import these:

>>> from qgis.core import QgsGeometry, QgsPoint


>>> QgsGeometry.createWedgeBuffer(QgsPoint(1,2), 25, 5, 2, )
<QgsGeometry: CurvePolygon (CompoundCurve (CircularString (1.76536686473017967 3.84775906502257348, 1.84523652348139877 3.8126155740733001, 1.92349722647006782 3.77402166635644321),(1.92349722647006782 3.77402166635644321, 1 2),(1 2, 1.76536686473017967 3.84775906502257348)))>



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.