Skip to content
Prev 20828 / 29559 Next

decimals in NA value using raster::writeRaster with .ascii format

On 04/11/2014 05:46 PM, Zack Holden wrote:
Look for

https://r-forge.r-project.org/scm/viewvc.php/pkg/raster/R/writeAllAscii.R?view=markup&root=raster

and lower the 15, or else change the formatC call, then rebuild raster.

As described earlier, raster does this on purpose: the gdal asciigrid
reader makes the wrong assumption about the data type when a grid starts
with too many missing values that look like an integer (like -9999 but
unlike -9999.0). This has been reported over a decade ago, and may be
seen as an indication of gdal's liveliness. Not only OpenSSL suffers
from too few eyes to make bugs shallow.

What software are you using that can't digest the 15-digit float?