kartoza / GEEST2

Next generation of the GEEST plugin for QGIS
GNU General Public License v3.0
0 stars 1 forks source link

Write the grids in a memory efficient way #307

Open timlinux opened 1 month ago

timlinux commented 1 month ago

@bennyistanto reports that writing grids was crashing QGIS if they are very large e.g. Tunisia

I think we can do this in a way that streams the features into the gpkg.

I did a little first test implementation. Before my change QGIS consumed more and more RAM then crashed.

With my test it uses a more or less constant amount of ram:

Screencast from 2024-09-25 16-09-06.webm

Integrate this so that we do not crash by trying to load all features in RAM at once.

timlinux commented 1 month ago

We should add a progress indicator too so that users understand how far the grid generation is.

timlinux commented 1 month ago

So an update here is that I was able to implement a safe way to write large grids.

image

However it does draw pretty slowly, though eventually renders completely.

image

Given the slow rendering and large dataset, I can see why Geest v1 was crashing out and it would likely have been quite difficult to resolve as it does its operations in memory.

I can implement an alternative workflow using raster that is efficient which I have also been thinking about - I will share the design for your comment shortly.