Dem data preprocessing
Tif is read directly by gdal, pyramids are constructed with gdaladdo, and rasterio reads the levels of nbufxsize and nbufysize, which are saved as vector for subsequent mesh generation. Construct your own data structure. Tif transformation.