[GRASSLIST:4958] Re: Mosaicking and reprojecting
Glynn Clements
glynn.clements at virgin.net
Thu Nov 14 20:34:02 EST 2002
Wayne Thai wrote:
> I'm a new user to GRASS and I installed it yesterday, and did the
> tutorial with the spearhead sample data online. Anyhow, now that I have
> some sort of idea of what I'm doing, I'm running into some trouble. I
> have a bunch of data, and I would like to make a mosaic of it, then
> reproject it into LAT/LON. The current projection is State Plane. Here
> is what I've done so far.
>
> I have imported the .tif files (with the .tfw) into GRASS, and it
> separates it into the RGB bands. So what I did was, I used the d.rgb
> command to display the image, but the colors come out all weird, how do
> I make it display the real colors.
Assign a grey-scale colour table to each of the bands. However, you
probably can't use "r.colors ... color=grey", as that maps black/white
to the minimum/maximum values which actually occur in the map. In
which case, you need to use "r.colors ... color=rules", e.g.
r.colors map=foo color=rules
Enter rules, "end" when done, "help" if you need it.
Data range is ... to ...
> 0 0 0 0
> 255 255 255 255
> end
Color table for [foo] set to rules
Once you've done this for one map, you can use "r.colors ... rast=..."
to copy the colour table to the other maps.
Which program did you use to import the data? AFAICT, r.in.tiff ought
to be doing this (r.in.ppm and r.in.png definitely do). I don't know
about r.in.gdal.
Also, is this with the actual 5.0.0 release, or a -beta or -pre
version?
> I have also tried using r.in.gdal but
> when I display that, it comes out black and white. I have also tried
> r.composite and it also displays weird colors (like a flash back to the
> 80's with neon colors and all)
In order to produce the correct results, r.composite also requires
that the individual bands have grey-scale colour tables.
However, you should generally avoid using r.composite; keeping the
data as separate colour bands will produce better results. AFAICT, the
only case where you *need* to use r.composite is for generating
composite colour layers for use in NVIZ (which doesn't currently
support using separate bands).
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list