Terrain-RGB-Mapbox raster generation
The application converts ArcInfo ASCII Grid files into TIFF files (Terrain-RGB), which contain elevation information encoded into RGB values according to the rules adopted in the Mapbox project: Mapbox Global elevation data
The height value for each pixel in the image can be taken using the formula: H = Elevation shift + (R * 256 * 256 + G * 256 + B) * Z resolution
Raster georeferencing is saved in *.tfw world files, which are also generated in the output folder.
ArcInfo ASCII Grid files must have square cells and center of bottom-left cell as the origin. These ArcInfo ASCII Grid files can be created automatically from LIDAR data using TerraScan.
ASCII file header example:
ncols 546 |
nrows 790 |
xllcenter 325484.750 |
yllcenter 6818819.750 |
cellsize 0.5000 |
nodata_value -9999 |
- ASCII folder - folder containing ArcInfo ASCII Grid source files. Files must have the extension “xyz” - other files are ignored. If the file format with the extension “xyz” does not match the specification, this file will also be ignored during processing
- TIFF folder - target folder in which the result will be saved (*.tif + *.tfw). The names of the output files will correspond to the names of the source ones. If the names match, the files in the output folder are overwritten without warning
- Elevation shift - “zero height”. Pixels corresponding to this height will have RGB values = (0, 0, 0)
- Z resolution - accuracy of height values. It is taken into account when encoding into color