[GRASSLIST:4953] Mosaicking and reprojecting

Hi All,

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. 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)

I am sure other members of this list can answer your question better than I, but usually create an indexed color tiff before importing it onto GRASS. The GIMP does a very nice job of this. If you a bringing in more than one TIFF, be sure you use the same palette for all the images.

Once you get all your images into GRASS, use the r.patch command to mosaic them together.

To reproject them, use r.proj. Your state plane coordinate system should be on the same datum as your lat/lon when you use r.proj because while r.proj does a great job of reprojecting, it does not handle datum transformations.

Rich

At 04:15 PM 11/14/2002 -0800, you wrote:

Hi All,

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. 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)

So my datum is Nad83, I would need another tool to convert this to Lat/Lon WGS84?
  ----- Original Message -----
  From: Richard Greenwood
  To: Wayne Thai
  Cc: GRASSLIST@baylor.edu
  Sent: Thursday, November 14, 2002 4:35 PM
  Subject: Re: [GRASSLIST:4953] Mosaicking and reprojecting

  I am sure other members of this list can answer your question better than I, but usually create an indexed color tiff before importing it onto GRASS. The GIMP does a very nice job of this. If you a bringing in more than one TIFF, be sure you use the same palette for all the images.

  Once you get all your images into GRASS, use the r.patch command to mosaic them together.

  To reproject them, use r.proj. Your state plane coordinate system should be on the same datum as your lat/lon when you use r.proj because while r.proj does a great job of reprojecting, it does not handle datum transformations.

  Rich

  At 04:15 PM 11/14/2002 -0800, you wrote:

    Hi All,
     
    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. 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)

  Richard W. Greenwood, PLS
  Greenwood Mapping, Inc.
  Rich@GreenwoodMap.com
  (307) 733-0203
  http://www.GreenwoodMap.com

At 05:11 PM 11/14/2002 -0800, you wrote:

So my datum is Nad83, I would need another tool to convert this to Lat/Lon WGS84?

NAD83 and WGS84 are basically the same, so you are in luck.

Rich

----- Original Message -----
From: [Richard Greenwood](mailto:Rich@GreenwoodMap.com)
To: [Wayne Thai](mailto:wayne@keyholecorp.com)
Cc: [GRASSLIST@baylor.edu](mailto:GRASSLIST@baylor.edu)
Sent: Thursday, November 14, 2002 4:35 PM
Subject: Re: [GRASSLIST:4953] Mosaicking and reprojecting
I am sure other members of this list can answer your question better than I, but usually create an indexed color tiff before importing it onto GRASS. The GIMP does a very nice job of this. If you a bringing in more than one TIFF, be sure you use the same palette for all the images.
Once you get all your images into GRASS, use the r.patch command to mosaic them together.
To reproject them, use r.proj. Your state plane coordinate system should be on the same datum as your lat/lon when you use r.proj because while r.proj does a great job of reprojecting, it does not handle datum transformations.
Rich
At 04:15 PM 11/14/2002 -0800, you wrote:
Hi All,
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. 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)
Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich@GreenwoodMap.com
(307) 733-0203
[http://www.GreenwoodMap.com](http://www.greenwoodmap.com/)

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@virgin.net>