geo-data / cesium-terrain-builder

A C++ library and associated command line tools designed to create terrain tiles for use in the Cesium JavaScript library
Other
706 stars 338 forks source link

How to specify nodata\novalue ? #68

Open mrgloom opened 6 years ago

mrgloom commented 6 years ago

For now I have DEM.tif with -350 value user for novalue and I need to perform preprocessing of DEM.tif by setting this values to 0 before tiling it with ctb, is there any way to specify novalue? maybe by gdal or by ctb itself?

muratkendir commented 6 years ago

Use gdal_calc.py script to change default nodata values in raster. Consider that if the expression in parenthesis returns a boolean value, so you can use it like "if ... else ..." condition. For exp: <<<gdal_calc.py -A input.tif --outfile=output.tif --calc="(A>-350)*A" --NoDataValue=0.000 --co=COMPRESS=DEFLATE --co=PREDICTOR=3>>>