LodPartition
Description
The LodPartition implements a level-of-detail aware partitioning scheme which is used to rearrange samples of a gridded dataset so that loading at runtime can be performed efficiently.
The virtual gridded dataset which is partitioned covers the entire coordinate space of 32-bit positive integers (i.e. coordinates in the range [0..2147483647]
). This space is split into interweaved chunks of equal size (i.e. both width and height are 256
).
The following figures explain the partitioning scheme by using a virtual gridded dataset of size 8x8
and a chunk size of 2x2
.
LOD Level 0: LOD Levels 0-3: LOD Levels 0-6: +-----------------+ +-----------------+ +-----------------+ | 0 . . . 0 . . . | | 0 . 1 . 0 . 1 . | | 0 4 1 4 0 4 1 4 | | . . . . . . . . | | . . . . . . . . | | 5 6 5 6 5 6 5 6 | | . . . . . . . . | | 2 . 3 . 2 . 3 . | | 2 4 3 4 2 4 3 4 | | . . . . . . . . | | . . . . . . . . | | 5 6 5 6 5 6 5 6 | | 0 . . . 0 . . . | | 0 . 1 . 0 . 1 . | | 0 4 1 4 0 4 1 4 | | . . . . . . . . | | . . . . . . . . | | 5 6 5 6 5 6 5 6 | | . . . . . . . . | | 2 . 3 . 2 . 3 . | | 2 4 3 4 2 4 3 4 | | . . . . . . . . | | . . . . . . . . | | 5 6 5 6 5 6 5 6 | +-----------------+ +-----------------+ +-----------------+ LOD Level 1: LOD Level 2: LOD Level 3: +-----------------+ +-----------------+ +-----------------+ | . . 1 . . . 1 . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | 2 . . . 2 . . . | | . . 3 . . . 3 . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . 1 . . . 1 . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | 2 . . . 2 . . . | | . . 3 . . . 3 . | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | +-----------------+ +-----------------+ +-----------------+ LOD Level 4: LOD Level 5: LOD Level 6: +-----------------+ +-----------------+ +-----------------+ | . 4 . 4 . 4 . 4 | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | 5 . 5 . 5 . 5 . | | . 6 . 6 . 6 . 6 | | . 4 . 4 . 4 . 4 | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | 5 . 5 . 5 . 5 . | | . 6 . 6 . 6 . 6 | | . 4 . 4 . 4 . 4 | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | 5 . 5 . 5 . 5 . | | . 6 . 6 . 6 . 6 | | . 4 . 4 . 4 . 4 | | . . . . . . . . | | . . . . . . . . | | . . . . . . . . | | 5 . 5 . 5 . 5 . | | . 6 . 6 . 6 . 6 | +-----------------+ +-----------------+ +-----------------+
LOD levels 0 to 3 contain one chunk; levels 4 to 6 contain four chunks. Levels 7 to 9 will contain sixteen chunks, and so on. Each chunk in a LOD level greater than 0
has four direct children (see ChildBlockIndex). Each chunk in a LOD level greater than 3
has one direct parent. In essence there are three distinct quad-trees, rooting at LOD levels 1, 2 and 3, respectively.