[GRASS-dev] Possible bug in r.out.gdal?

Markus Metz markus.metz.giswork at googlemail.com
Tue Aug 11 10:15:40 EDT 2009

Soeren Gebbert wrote:
> Dear Devs,
> i found a strange behavior in r.out.gdal while updating the GRASS test 
> suite.
> Im using the grass6.4svn snapshot: 
> grass-6.4.svn_src_snapshot_2009_08_01.tar.gz.
> on openSuse 10.3 Linux
> gdal version 1.6.1
Using grass6.4svn with gdal1.6.0 here

Exporting elevation from nc_spm_08 with

r.out.gdal input=elevation at PERMANENT format=DTED type=Float32 

gives me

Driver <DTED> does not support direct writing. Using MEM driver for
intermediate dataset.
Exporting to GDAL data type: Float32
Warning 1: The source does not appear to be a properly formatted cell.
Warning 1: The source projection coordinate system is PROJCS["Lambert 
Only WGS 84 is supported.
The DTED driver will generate a file as if the source was WGS 84 
projection coordinate system.
Warning 1: The corner coordinates of the source are not properly aligned 
on plain latitude/longitude boundaries.
Warning 1: The horizontal source size is not conformant with the one 
expected by DTED Level 1 at this latitude (1500 pixels found instead of 
r.out.gdal complete.

> These steps are performed:
> GRASS 6.4.0svn > g.region -p
> projection: 1 (UTM)
At least in gdal1.6.0, only WGS84 is supported for DTED, see warning 
above. WGS72 is also supported, but the gdal driver issues a warning.
> GRASS 6.4.0svn > r.out.gdal --verbose format=DTED type=Float32 
> input=elevation output=/tmp/test.dted 
> ....
> ERROR 5: Access window out of range in RasterIO().  Requested
> (0,994) of size 201x1 on raster of 100x100.
> ERROR 5: Access window out of range in RasterIO().  Requested
> (0,995) of size 201x1 on raster of 100x100.
> ERROR 5: Access window out of range in RasterIO().  Requested
> (0,996) of size 201x1 on raster of 100x100.
These messages are generated by gdal, not r.out.gdal. See
for more info on the DTED format, particularly the section Creation 
Issues and the link to the DTED specs:
If you can confirm that the input data are exactly formatted as Level 0, 
1 or 2 cell, it is a problem of r.out.gdal. Also note that for DTED, 
elevation data is returned as 16 bit signed integer (citation from gdal).

hope that helps,

Markus M

More information about the grass-dev mailing list