Voronoi Diagram on a given polygon using QGIS

You can use the v.voronoi tool from GRASS to create voronoi polygons, and it will enables you to specify an extent based on layer extent:

enter image description here


You can do this simply, by adjusting the buffer.

Here is an example. The following polygon and points layers would normally result in the problem you illustrate in your question.

irregular polygon with random points

  1. When running the Voronoi polygons tool, increase the buffer region percent. The exact amount will vary, but since we're clipping the result, it won't hurt to overshoot. In my example, I use a buffer of 100% to double the extent.

Here is the output. My 100% buffer actually extends well beyond this image.

voronoi polygons overlaid on input layers

  1. Clip the Voronoi polygons by the original polygon layer.

clipped voronoi polygons

And there you have it!