Constructs a DEMData
object
the tile's unique id
RGBAImage data has uniform 1px padding on all sides: square tile edge size defines stride // and dim is calculated as stride - 2.
the encoding type of the data
the red channel factor used to unpack the data, used for custom
encoding only
the green channel factor used to unpack the data, used for custom
encoding only
the blue channel factor used to unpack the data, used for custom
encoding only
the base shift used to unpack the data, used for custom
encoding only
DEMData is a data structure for decoding, backfilling, and storing elevation data for processing in the hillshade shaders data can be populated either from a pngraw image tile or from serialized data sent back from a worker. When data is initially loaded from a image tile, we decode the pixel values using the appropriate decoding formula, but we store the elevation data as an Int32 value. we add 65536 (2^16) to eliminate negative values and enable the use of integer overflow when creating the texture used in the hillshadePrepare step.
DEMData also handles the backfilling of data from a tile's neighboring tiles. This is necessary because we use a pixel's 8 surrounding pixel values to compute the slope at that pixel, and we cannot accurately calculate the slope at pixels on a tile's edge without backfilling from neighboring tiles.