[GRASS-user] problem with export of raster data

Markus Metz markus.metz.giswork at googlemail.com
Tue Feb 24 04:14:20 EST 2009



FAROUX STEPHANIE wrote:
> Markus Neteler wrote:
>> On Mon, Feb 23, 2009 at 12:15 PM, FAROUX STEPHANIE
>> <stephanie.faroux at meteo.fr> wrote:
>>  
>>> Hello
>>> I try to export a raster integer map whose values range from -9999 to
>>> 5880712. How can i specify that i want integer 4 bytes and not 
>>> integer 2
>>> bytes (it makes integer 2 bytes)??
>>>     
>>
>> If you export with r.out.gdal you can choose among
>>
>>       type   File type
>>               options: 
>> Byte,Int16,UInt16,Int32,UInt32,Float32,Float64,CInt16,
>>                        CInt32,CFloat32,CFloat64
>>
>> This is the range which GRASS support for export to GDAL
>> supported formats (of course it depends if the format is compatible
>> with the selected type, see GDAL manual pages for details).
>>
>> Markus
>>
>>   
> Yes i saw it.
> However i wonder what is the difference between Uint32, Int32, CInt32? 
> I suppose: unsigned integer 32 bits for the first, but the others?
> Then, i want binary files, what should i choose among the proposed 
> formats?
> I tried with no format and with GTiff format. For example when i do: 
> "r.out.gdal input=world_fa2 format=GTiff2 type=Int32 
> output=world_fa_gdal"
> or "r.out.gdal input=world_fa2 format=GTiff2 type=UInt32 
> output=world_fa_gdal" or "r.out.gdal input=world_fa2 format=GTiff2 
> type=CInt32 output=world_fa_gdal"
I think it must be GTiff and not GTiff2. The command would be
r.out.gdal input=world_fa2 format=GTiff type=Int32 output=world_fa_gdal.tif
BTW, no format defaults to GTiff format in r.out.gdal.

UInt32 is unsigned integer 32 bit, yes. Int32 is signed integer 32 bit, 
CInt32 is complex signed integer 32 bit (not supported by grass). With 
world_fa2 (range is -9999 to 5880712, yes?), Int32 seems the right choice.

Markus M



More information about the grass-user mailing list