Situation - have a simplistic model of land classification, based on approx 4 layers which describe natural characteristics which do not vary much in time. Many polygons. Fifth layer is a boundary layer, areas of interest which will change in time.
There is a current incarnation which was made by starting with the boundaries and writing attributes to it and intersecting the polygons, this created a very realistic display of the landscape. But also created many sliver polygons, orphans and redundant information. It was all done on desktop, writing shapefiles and geopackages to disk. One layer originally was a raster. Combined final layer is approx 1 GB on disk.
It is going to be clumsy to reproduce on the fly, as the boundary polygons are updated in time.
Proposal - do all this on the server in a PostGIS DB, write all the static information to a grid (25m hexagon) and then update any or all boundary polygons as required based on coverage of the grid. Make use of PostGIS functions for subsequent processing. Planar / UTM required for area calculations, so H3 grid would seem to be a distraction.
First attempt, first step, create the grid;
From the Vector > Research Tools > Create Grid
dialog in QGIS
Algorithm 'Create grid' starting…
Input parameters:
{ 'CRS' : QgsCoordinateReferenceSystem('EPSG:7855'), 'EXTENT' : '-243151.60475903528,1304000.1983627826,5816401.698888286,6903705.604971119 [EPSG:32755]', 'HOVERLAY' : 0, 'HSPACING' : 25, 'OUTPUT' : 'postgis:dbname=\'terrae\' host=112.213.33.202 port=5432 table=\"XXXXX\".\"grid_hx25\" (the_geom)', 'TYPE' : 4, 'VOVERLAY' : 0, 'VSPACING' : 25 }
Writes a geopackage to disk. After approx 18 hrs, indicators says 1% complete and a 12.5 GB file written to disk. Grid displayed covers 23 km x 1,100 km, neat hexagons as expected, but only say 1% of the project area. This appears to be going down the track of creating something very cumbersome.
Would the experience be different on the PostGIS DB?
Stepping back a bit, is there a better processing method to the problem?
I am aware of How to get the Area of two intersecting polygons on PostGIS? which will be a help but does not consider the idea of using a grid.