Converting Grass raster to GIF or TIFF

Bill Brown brown at gis.uiuc.edu
Wed Jan 31 07:00:00 EST 1996


>
>Thank you for the reply. Unfortunately I did as you suggested but get the same
 
>garbage that I had before. I don't understand that if I have a Grass raster
>file and I know it's size (according to r.out.ppm, row = 2736, col = 1700), 
>that Grass will not read it and display the image ? 
>

r.out.ppm converts a GRASS raster file to a PPM image file
at the pixel resolution of the CURRENTLY DEFINED REGION. 
e.g., to get the resolution of the raster map, do:
        g.region rast=[mapname]
before running r.out.ppm.

>I have had problems with this in the past, Grass doesn't seem to be very 
>co-operative for even it's own raster images to be displayed. 
>

If you can't display the raster file, it probably won't export 
correctly either.  Where did the original data come from and how did
you import it into GRASS?  If you can't display it, how do you 
know it is a GRASS raster image?  If it is a raw raster file, GRASS
obviously needs to know its dimensions (run r.support) before it can be
displayed or do anything else with it.  If you don't know its dimensions,
you need to go to the original source to find out.  If it came from another
platform as a raw raster, you may need to do some byte swapping. It's not
a GRASS raster file until it has a cellhd file which contains it's 
dimensions and geographic information.  A raw raster file is just a 
string of numbers, one per cell.  You have to know how many cells are in
a row before you can do anything with it!

- Bill
brown at gis.uiuc.edu







More information about the grass-user mailing list