I tried to use QGIS to create voronoi polygons from a set of points with an attribute (
group) and then merge the polygons with the same value for that attribute. (This last step is what QGIS calls Dissolve.) It worked in principle, but since the built-in voronoi algorithm produces erroneous output, I am trying alternatives, especially ST_VoronoiPolygons.
I managed to load a table of points (
my_points) into PostgreSQL. It has a
geom column (automatically created for PostGIS) and a
I read that I should use the following commands:
drop table if exists voronoi_output; create table voronoi_output as select ST_Dump(ST_VoronoiPolygons(ST_Collect(geom))) from my_points;
But the newly created table
voronoi_output is missing the
group column, which is needed for the next step (dissolve). How can this be fixed?
ST_VoronoiPolygons would accept polylines as input, I could just feed it a bunch of polylines instead of "groups" of points. Then the "dissolve" step would not be needed), but I do not expect that to work.)