- Messages
- 15
- Country
While waiting for Asobo to get their SDK together I've been slowly digging into cgl files. I'm creating this thread to keep possible discussion in the correct part of the forum.
Like [theisomizer] explains in another thread on this forum, cgl is a container format. It has an uncompressed header, which contains high-level information of what the cgl contains. Namely compression parameters, object/tile count and such. This uncompressed header is followed by a lzma compressed "data header" that holds information about individual objects/tiles in the cgl. Their delta compressed quadkey position relative to cgl base quadkey, delta compressed compressed data length and uncompressed data length relative to compressed data length. After that follows lzma compressed data streams, one for each object in the cgl.
In a dem-cgl each object is a 257*257 array of elevation values (8 or 16 bits) with a 7 bytes long header. That header has height multiplier (Float32), height offset(Int16) and bitdepth/bitsperpixel (Int8).
Python code of a hacky implementation of dem and cgl generation plus some more documentation can be found at GitHub: muumimorko/MSFS2020_CGLTools
Also a proof of concept mod is available at flightsim.to: DEM for Finland - 20 meter resolution
[This post will update]
Like [theisomizer] explains in another thread on this forum, cgl is a container format. It has an uncompressed header, which contains high-level information of what the cgl contains. Namely compression parameters, object/tile count and such. This uncompressed header is followed by a lzma compressed "data header" that holds information about individual objects/tiles in the cgl. Their delta compressed quadkey position relative to cgl base quadkey, delta compressed compressed data length and uncompressed data length relative to compressed data length. After that follows lzma compressed data streams, one for each object in the cgl.
In a dem-cgl each object is a 257*257 array of elevation values (8 or 16 bits) with a 7 bytes long header. That header has height multiplier (Float32), height offset(Int16) and bitdepth/bitsperpixel (Int8).
Python code of a hacky implementation of dem and cgl generation plus some more documentation can be found at GitHub: muumimorko/MSFS2020_CGLTools
Also a proof of concept mod is available at flightsim.to: DEM for Finland - 20 meter resolution
[This post will update]