[GRASS-user] problem in exporting grass2idrisi

Markus Neteler neteler at osgeo.org
Sun Oct 5 17:10:02 EDT 2008


On Fri, Oct 3, 2008 at 1:11 PM, orkun <temiz at deprem.gov.tr> wrote:
> hello
>
> I cannot manage with r.out.gdal for idrisi format:
> What am I doing wrong ?
>
> here is what I did.
>
> GRASS 6.3.0RC5 (pro1):~ > gdalinfo --formats | grep -i Idrisi
>  RST (rw+): Idrisi Raster A.1
> [Raster MASK present]
> GRASS 6.3.0RC5 (pro1):~ > r.out.gdal format=RST input=e30a1_DEM
> output=e30a1_DEM_id  type=Int16
> Exporting to GDAL data type: Int16
> ERROR 4: `e30a1_DEM_id' not recognised as a supported file format.
>
> ERROR: Unable to create <e30a1_DEM_id> dataset using <RST> driver
> [Raster MASK present]

I can reproduce the problem.
Using the debugger, it turns out that GDALCreate() fails.

Looking at
http://www.gdal.org/frmt_Idrisi.html
it seems that Int16 is supported:

"This format is basically a raw one. There is just one band per files,
except in the RGB24 data type where the Red, Green and Blue bands are
store interleafed by pixels in the order Blue, Green and Red. The
others data type are unsigned 8 bits integer with values from 0 to 255
or signed 16 bits integer with values from -32.768 to 32.767 or 32
bits single precision floating point.32 bits.
"

Not sure what's going on. Perhaps a GDAL bug? I am using GDAL from trunk.

Testing with GDAL tools:
r.out.gdal geology_30m out=geology_30m.tif type=Int16
Exporting to GDAL data type: Int16
ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.
 100%
WARNING: Input raster map constains cells with NULL-value (no-data). The
         value -32768 was used to represent no-data values in the input
         map.You can specify nodata value by nodata parameter.
r.out.gdal complete.

gdal_translate -of RST geology_30m.tif geology_30m
Input file size is 1532, 560
0ERROR 4: `geology_30m' not recognised as a supported file format.

I think that this should be reported to GDAL:
http://trac.osgeo.org/gdal/

If you hesitate, I can do it - just let me know.

Possibly I am overlooking something but I think that it should
at least come with a better error message.

Markus



Markus


More information about the grass-user mailing list