I am creating voronoi polygons for locations inside a country, using PostGIS. The function creates these areas for ~80,000 locations in less than a second.
However, I can only get the polygons to extend to the default envelope area, which is 50% of the bounding box of points.
WITH voronoi (vor) AS
(SELECT ST_Dump(ST_VoronoiPolygons(ST_Collect(geom))) FROM public.branches_atms_0601)
SELECT (vor).path, (vor).geom FROM voronoi;
This generates the polygon(s) below:
What I would like it to do is to clip this to the footprint of UK. This can apparently be defined within the function https://postgis.net/docs/ST_VoronoiPolygons.html However when I try to run it with my UK footprint polygon, I get the error with the code...
WITH voronoi (vor) AS
(SELECT ST_Dump(ST_VoronoiPolygons(ST_Collect(geom), public."Dissolved")) FROM
public.branches_atms_0601)
SELECT (vor).path, (vor).geom FROM voronoi;
ERROR: missing FROM-clause entry for table "public"
LINE 2: ...LECT ST_Dump(ST_VoronoiPolygons(ST_Collect(geom), public."Di...
^
SQL state: 42P01
Character: 82
How can I fix this? I assume the issue is coming from assigning the extends_to parameter incorrectly, but I don't know how to approach it...