I'm trying to develop a plugin for QGIS where I want to extrapolate points to a surface. The plugin needs to handle 100,000 points rather quickly and following code works alright. The problem is the extent.
file_name&file_name_poly = string with the path to the files. shpfile = path to shapefile with the points extent = '%f,%f,%f,%f'% (shpfile.bbox,shpfile.bbox, shpfile.bbox,shpfile.bbox) processing.runalg("grass:v.voronoi", file_name + ".shp", False, True, extent, -1, 0, 3, file_name_poly)
So I wonder is it possible to set a maximum size for each polygon? Or is it somehow possible to set the extent as a polygon?
I have tried to implement this solution hence the code became much slower and with the same problem. This picture is a part of the field, the dots are the original data points, the solid polygons are the ones from the grass processing voronoi algorithm and the dotted line polygons are from ST_DelaunayTriangles link.
Writing this post might solved the problem. The solution might be to do the grass voronoi diagram first and the make an st_within to remove the unnecessary parts afterwards.
I'll post again when I've tried that solution!