I need to export a raster I produced with GRASS. The Map Display portraits this raster like this:
The metadata of this raster also looks pretty normal:
> r.info map=blenddem
+----------------------------------------------------------------------------+
| Map: blenddem Date: Fri May 5 11:35:05 2017 |
| Mapset: DEMs Login of Creator: desouslu |
| Location: Luzern |
| DataBase: /home/desouslu/maps/grass |
| Title: |
| Timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 0 |
| Data Type: DCELL |
| Rows: 3369 |
| Columns: 3110 |
| Total Cells: 10477590 |
| Projection: CH1903+ / LV95 |
| N: 210553.5 S: 208869 Res: 0.5 |
| E: 668202 W: 666647 Res: 0.5 |
| Range of data: min = 430.691497802734 max = 600.981266929298 |
| |
| Data Description: |
| generated by r.patch |
| |
| Comments: |
| r.patch input="tmp_3151920,uavdem" output="blenddem" |
| |
+----------------------------------------------------------------------------+
I am using r.out.gdal
to export this raster, and apparently everything goes on fine:
> r.out.gdal input=blenddem output=/home/desouslu/maps/blenddem.asc format=AAIGrid --overwrite -c
Driver <AAIGrid> does not support direct writing. Using MEM driver for
intermediate dataset.
Checking GDAL data type and nodata value...
100%
Using GDAL data type <Float64>
Input raster map contains cells with NULL-value (no-data). The value -nan
will be used to represent no-data values in the input map. You can specify
a nodata value with the nodata option.
Exporting raster data to AAIGrid format...
100%
r.out.gdal complete. File
</home/desouslu/maps/blenddem.asc> created.
However, the resulting raster is actually empty:
> cat /home/desouslu/maps/blenddem.asc
ncols 1
nrows 1
xllcorner 0.000000000000
yllcorner 0.000000000000
cellsize 1.000000000000
NODATA_value -nan
-nan
What is exactly going on here? Am I using r.out.gdal
incorrectly?
g.region raster=blenddem
?