<div dir="ltr">Hi Markus,<br><br>You are also completely right! Some of data I exported (elevation, slope, aspect) did not have NULL cells. And in the other data that have NULLs, I used r.null to ensure that the NULL value was -9999. With that I simply transformed the NULL cells to the value -9999, wich are exported as a value and not as a NULL.<br><br>I see now that the GRASS behaviour is the correct, because it uses NODATA_value when the input raster contains cells with NULL value, and omits that parameter when the input raster does not contain any NULL cell.<br><br>I was somehow mistaken because it seems that other software use NODATA_value as a default parameter, and for instance Farsite and FlamMap, where I use the data exported from GRASS, did not work well without the NODATA_value in the ASCII files, even if the input data has no NULL cells.<br><br>Thank you very much!<br><br>Best regards,<br>Pedro<br><br><br><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-04 9:52 GMT+01:00 Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pedro,<br>
<br>
I created a test case with the North Carolina sample dataset (by<br>
zooming in the GUI to the elevation map border and setting that as<br>
computational region):<br>
<br>
# GRASS 7.2.2svn (nc_spm_08_grass7):~ ><br>
<br>
# set computational region around east elevation map border<br>
g.region n=216820 s=216770 w=644960 e=645040 res=10 -p<br>
<br>
# be sure that no data pixels are involved.<br>
r.out.ascii input=elevation output=-<br>
north: 216820<br>
south: 216770<br>
east: 645040<br>
west: 644960<br>
rows: 5<br>
cols: 8<br>
101.913734 102.054886 102.395638 102.597229 * * * *<br>
101.821335 102.044083 102.331108 102.58638 * * * *<br>
101.703033 101.955849 102.195648 102.54126 * * * *<br>
101.56945 101.840988 102.152328 102.529175 * * * *<br>
101.530174 101.792572 102.097748 102.477859 * * * *<br>
<br>
# export to AAIGrid format:<br>
r.out.gdal input=elevation output=elev.grd format=AAIGrid<br>
Driver <AAIGrid> does not support direct writing. Using MEM driver for<br>
intermediate dataset.<br>
Checking GDAL data type and nodata value...<br>
 100%<br>
Using GDAL data type <Float32><br>
Input raster map contains cells with NULL-value (no-data). The value -nan<br>
will be used to represent no-data values in the input map. You can specify<br>
a nodata value with the nodata option.<br>
Exporting raster data to AAIGrid format...<br>
 100%<br>
r.out.gdal complete. File <elev.grd> created.<br>
<br>
<br>
# verification:<br>
cat elev.grd<br>
ncols        8<br>
nrows        5<br>
xllcorner    644960.000000000000<br>
yllcorner    216770.000000000000<br>
cellsize     10.000000000000<br>
NODATA_value  -nan<br>
 101.91373443603515625 102.0548858642578125 102.39563751220703125<br>
102.59722900390625 -nan -nan -nan -nan<br>
 101.8213348388671875 102.0440826416015625 102.33110809326171875<br>
102.5863800048828125 -nan -nan -nan -nan<br>
 101.703033447265625 101.95584869384765625 102.195648193359375<br>
102.541259765625 -nan -nan -nan -nan<br>
 101.56945037841796875 101.8409881591796875 102.1523284912109375<br>
102.5291748046875 -nan -nan -nan -nan<br>
 101.53017425537109375 101.792572021484375 102.097747802734375<br>
102.4778594970703125 -nan -nan -nan -nan<br>
<br>
... all fine and it works out of the box!<br>
Are you sure that you had any NULL cells at all? Note that the current<br>
computational region is respected for export.<br>
<span class="HOEnZb"><font color="#888888"><br>
Markus<br>
</font></span></blockquote></div><br></div>