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:
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.
- 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.
- Clip the Voronoi polygons by the original polygon layer.
And there you have it!