[GRASSLIST:2804] Re: r.in.tiff
Eric G. Miller
egm2 at jps.net
Tue Dec 18 21:18:20 EST 2001
On Tue, 18 Dec 2001 19:34:29 -0300, ulf at mail.zmt.uni-bremen.de wrote:
>
> Trying to import a greyscale TIF file (24 bit colour depth), I get the
> following message:
Their isn't any 24bit greyscale format in the base TIFF 6 standard.
Only, monochrome, 8 bit greyscale, 8 bit palette color, and 24 bit
RGB color.
> GRASS:~/daten/gis/grass > r.in.tiff input=BANDA1.TIF output=band1
> ERROR: Only handle 1-channel gray scale or 3-channel color. Try -f switch.
r.in.tiff isn't very flexibile about it's TIFF support. It's also fairly
buggy in general.
> Anyway, r.in.tiff does not accept a "-f" switch (does it come from an
> internally used r.in.bin?). What are your recommendations in respect
> to this error?
Hmm, shouldn't be an -f switch...
> The TIF file originates from a satellit image in a particular format
> but was extracted using a utility coming with the image. In theory, I
> also could use the original files (1 byte per pixel, 3200 rows, 3520
> lines, 512 byte header). Do I have to cut the header of 512 byte with
> a self-made program to use r.in.bin, or is there another import
> facility I could use?
Perhaps you could use the original. r.in.gdal supports a number of
formats. Also, it's tiff support is better than r.in.tiff.
Since you say the original is 1 byte per pixel, I wonder why the
conversion tool you used would write a tiff with more bytes?
Anyway, there may be some options. If you know the extents, you
probably could use r.in.bin, by first chopping off the 512 byte
header and specifying coordinate info on the command line. Or, you
could try writing an ESRI style header file (*.hdr)
and renaming the original file to (*.bil). The header has things
like data type, rows, columns, and upper left pixel coordinate.
r.in.gdal can handle those pretty easy..
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-user
mailing list