I am trying to group points using a Virtual layer and create a rectangle covering an extents but I cannot get it to return the geometry.
Current code is this:
SELECT
VP.Page,
st_envelope(st_collect(VP.geometry)) AS geometry
FROM
"Viewpoint Locations" AS VP
GROUP BY
VP.Page
Coordinates are in OSGB
Sample point:
wkt_geom ele name VP Easting Northing Date Time_Only Distance Bearing Page
PointZ (347471.40698287688428536 169679.50496837147511542 20.05986800000000159) 20.059868 632 01 347471.407 169679.505 15/11/2021 12:55:23 630.613 165.476 1
Link to file: https://drive.google.com/open?id=101V1qc9KstZ-e9jh-AlUzlT5EAfTkVFf&authuser=gwrichardson%40gmail.com&usp=drive_fs