[GRASSLIST:296] Re: r.out.gdal problem

Wolfgang Zillig wollez at gmx.net
Tue Mar 21 14:24:35 EST 2006


Int32 gives very unrealistic colors see 
http://www.student.kuleuven.ac.be/~s0167070/grass/a1.tif
Int16 gives grayscale


GRASS 6.1.cvs (uberg_mgi):/cygdrive/d/temp > r.out.gdal format=GTiff 
metaopt=TILED=YES,COMPRESS=JPEG,JPEG_QUALITY=75 input=a1 output=a1.tif 
type=Int32
Writing format: GTiff
Writing type:   Int32
Input file size is 535, 422
0.Warning 1: Unable to export color table to GeoTIFF file.  Color
tables can only be written to 1 bit 8bit GeoTIFF files.
..10...20...30...40...50...60...70...80...90...100 - done.
GRASS 6.1.cvs (uberg_mgi):/cygdrive/d/temp >

Wolfgang


Jachym Cepicky schrieb:
> I would say, that type=Int32 shold work fine
>
> jachym
>
> On Tue, Mar 21, 2006 at 06:53:50PM +0100, Wolfgang Zillig wrote:
>   
>> My raster map is from the type CELL (with a range of [0-32767]). Can I use (and 
>> how) r.out.gdal directly?
>>
>> Wolfgang
>>
>>
>>
>> Jachym Cepicky schrieb:
>>     
>>> Hallo,
>>>
>>> On Tue, Mar 21, 2006 at 04:59:43PM +0100, Wolfgang Zillig wrote:
>>>  
>>>       
>>>> To make it clear, I have a georeferenced raster grafic. r.out.tiff works, and 
>>>> I can do successfully:
>>>>
>>>> C:\Documents and Settings\s0167070>gdal_translate -of GTiff -co TILED=YES -co 
>>>> CO
>>>> MPRESS=JPEG -co JPEG_QUALITY=65 in.tif out.tif
>>>>
>>>> (But I have to say that I also have FWTools installed on my computer, I 
>>>> haven't tried with cygwin)
>>>>
>>>> Is it possible to export a raster file with the command given above? Grass 
>>>> always complains that I have to specify the "type", which I don't know.
>>>>    
>>>>         
>>> Type is, what does your r.info your_map |grep "Data Type" you.
>>>
>>> This will be CELL (integer), DCELL or FCELL (floating point)
>>>
>>> r.out.tiff makes always integers from floating point maps. via
>>> r.out.gdal's "type" option, you can specify the precision of resulting
>>> raster file
>>>
>>> hope, this helps
>>>
>>> Jachym
>>>
>>>  
>>>       
>>>> Wolfgang
>>>>
>>>>
>>>> Patton, Eric schrieb:
>>>>    
>>>>         
>>>>> When you say graphic, do you mean a non-georeferenced image? I'm guessing,
>>>>> maybe r.out.gdal is only good for georeferenced images. Have you had any
>>>>> luck trying 'gdal_translate -of JPEG input output'?
>>>>>
>>>>> ~ Eric.
>>>>> -----Original Message-----
>>>>> From: owner-GRASSLIST at baylor.edu
>>>>> To: grasslist-en
>>>>> Sent: 3/21/2006 10:18 AM
>>>>> Subject: [GRASSLIST:281] r.out.gdal problem
>>>>>
>>>>> Hello,
>>>>>
>>>>> I somehow don't completely understand the usage of r.out.gdal. I prepared a 
>>>>> graphic (which is an imported tiff) with r.composite. I can export it with 
>>>>> r.out.tiff without any problems. But how can I use r.out.gdal to export it 
>>>>> as JPEG (or GTiff with TILED=YES). I always fail
>>>>>
>>>>> to specify the correct option for the required "type". I already tried every 
>>>>> possibility which is listed (Byte, Int16,...), but without success. What 
>>>>> "type" do I have to use?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Wolfgang
>>>>>
>>>>>
>>>>>       
>>>>>           
>>>  
>>>       
>
>   




More information about the grass-user mailing list