boku-ilen / geodot-plugin

Godot plugin for loading geospatial data
GNU General Public License v3.0
108 stars 18 forks source link

Raster editing should be possible without writing the result to disk right away #83

Open kb173 opened 1 year ago

kb173 commented 1 year ago

Like with vector editing, we should add a mid-layer where changes are written to, rather than writing directly into the original data.

Specifically for raster data, this could just be another GeoRasterLayer with the same size, initially filled with nodata, to which only the edited regions are added over time. When loading raster data, this dataset should be added onto the original data. When saving, that dataset should be merged into the original one and cleared (filled with nodata again).

This not only makes editing less error-prone, but should also drastically improve performance (while slightly reducing performance of raster loading when the data has been edited - but that's rare)