[GRASS5] r.in.tiff problem

Glynn Clements glynn.clements at virgin.net
Thu Jul 26 20:34:20 EDT 2001


Rich Shepard wrote:

>   I must admit to feeling a bit uncomfortable with all these data import
> problems I'm having, but I do read the man pages carefully before I begin
> and when I have problems.
> 
>   This time it's with a DRG (Digital Raster Graphic) file; a scanned image
> of a 7.5-minute topographic quadrangle map. The data files are a pair: one
> has the entension .TIF, the other .TWF

Do you mean .TFW?

> jOnce I figured out that the filename
> began with an "O" (oh) rather than a "0" (zero), r.in.tiff ran and displayed
> several lines of output.
> 
>   When I started a monitor and used d.rast to display the image, all I saw
> was a narrow, white rectangle.
> 
>   How do I determine where the problem originates?

Sounds like a region issue. If a corresponding .TFW exists, r.in.tiff
will set the region according to that file's contents. The format is
six floating-point numbers, one per line, which define an affine
transformation.

The first four describe the scale/rotation/shear part. Rotation isn't
supported, so the second and third values must be zero. The first is
the E/W resolution and the fourth is the negated N/S resolution
(presumably the TFW coordinate system has its Y-axis in the opposite
direction to that used by GRASS).

The last two are the coordinates of the centre of the top-left (North
West) pixel.

Using "g.region rast=...; g.region -p" will show the region obtained
from the .TFW file.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list