JuliaDataCubes / PyramidScheme.jl

Building and using pyramids for large raster data
MIT License
9 stars 1 forks source link

PyramidScheme for DGGS level computations #28

Open felixcremer opened 1 month ago

felixcremer commented 1 month ago

We can reuse the PyramidScheme code to also compute the pyramids of a DGGS dataset for that we would need a way to specify the used internal kernel for the computation either as a user input or via a keyword.

@danlooo

danlooo commented 1 month ago

Yes, I think a generalization of pyramid building would allow to implement any convolution, including those involved in aggragating DGGS cells. In the latter case, one can define this by params Kernel $K$ and Stride $S$:

Kernel

image

$$ K=\frac{1}{8}* \begin{matrix} 0 & 1 & 1\ 1 & 2 & 1\ 1 & 1 & 0 \end{matrix} $$

in which $K$ weights the individual child cell values by area. However, one need to handle edge cases e.g. 12 pentagons.

Stride

image

Stride $S$ is $2*cell width$ in both $j$ and $i$ direction. Overlap to other faces of the icosahedron might be resolved by adding a paddings to the data.