Hello,
I'm very new to Grass GIS and have just compiled 5.0.2 and installed it
succesfully on Suse Linux 8.1.
Now I'm trying to merge several Geotiff 8-bit images into one mosaic, but I
have problems with r.patch. The output shows only one image - first one -
with correct colors - the others are totally scrambled. Just overlaying one
by another it shows that the import with r.in.gdal was ok.
I found that Mr. Neteler had some problems with r.patch, too. But if I use his
script i.image.mosaic (which uses r.mapcalc to patch the images) I get no
color output - although I set the map region big enough.
I'm kind of desperate now - anybody got an idea how to create a mosaic of
several geotiff images?
--
Juergen Ambrosy
juergen.ambrosy@ewetel.net
At 12:42 PM 10/4/2003 +0200, you wrote:
Hello,
I'm very new to Grass GIS and have just compiled 5.0.2 and installed it
succesfully on Suse Linux 8.1.
Now I'm trying to merge several Geotiff 8-bit images into one mosaic, but I
have problems with r.patch. The output shows only one image - first one -
with correct colors - the others are totally scrambled. Just overlaying one
by another it shows that the import with r.in.gdal was ok.
I found that Mr. Neteler had some problems with r.patch, too. But if I use his
script i.image.mosaic (which uses r.mapcalc to patch the images) I get no
color output - although I set the map region big enough.
An 8bit tiff uses a color palette. The value of any given pixel is used to lookup the red,green,blue value in a table. The table is the palette, and is a part of the tif file. It is likely that each of tiff's has a different palette. The color table for each image is in the colr directory of your location. They are just ASCII files.
You can preprocess each image with Gimp or Photoshop so that they all have the same color palette before you import them into GRASS, or you can convert them to 24bit tiffs before importing. In a 24bit tiff each pixel has 3 bytes, one each for red, green, and blue, so no color palette is used.
Rich
Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203
http://www.GreenwoodMap.com
Juergen Ambrosy wrote:
Hello,
I'm very new to Grass GIS and have just compiled 5.0.2 and installed it succesfully on Suse Linux 8.1.
Now I'm trying to merge several Geotiff 8-bit images into one mosaic, but I have problems with r.patch. The output shows only one image - first one - with correct colors - the others are totally scrambled. Just overlaying one by another it shows that the import with r.in.gdal was ok.
I found that Mr. Neteler had some problems with r.patch, too. But if I use his script i.image.mosaic (which uses r.mapcalc to patch the images) I get no color output - although I set the map region big enough.
I'm kind of desperate now - anybody got an idea how to create a mosaic of several geotiff images?
Juergen,
I imagine these 8bit images are using colormaps, and that they are different
colormaps. So you won't be able to directly merge them. What you need to
do is expend them to 24bit images (inside GRASS or outside) and then patch
those together. I don't know the details of how to accomplish that though.
Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
Thanks for replying, Mr.Greenwood, Mr.Warmerdam,
Mr. Greenwood, could you explain which steps are necessary to preprocess the
8bit-tiff images with Gimp, so that all use the same color palette?
If possible I want to avoid using 24bit geotiff, I think gdal can't even
import 24bit geotiff, only 8bit. So I need r.in.tiff to import and
georeference it afterward which I want to avoid, too.
An 8bit tiff uses a color palette. The value of any given pixel is used to
lookup the red,green,blue value in a table. The table is the palette, and
is a part of the tif file. It is likely that each of tiff's has a different
palette. The color table for each image is in the colr directory of your
location. They are just ASCII files.
You can preprocess each image with Gimp or Photoshop so that they all have
the same color palette before you import them into GRASS, or you can
convert them to 24bit tiffs before importing. In a 24bit tiff each pixel
has 3 bytes, one each for red, green, and blue, so no color palette is
used.
Rich
Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203
http://www.GreenwoodMap.com
--
Juergen Ambrosy
juergen.ambrosy@ewetel.net