Table of contents Previous: IR Channel Differencing Next: Masking Features at Land-Water Boundaries

15.2 Image Remapping

Table of Contents:


Introduction to Remapping of Imagery

Remapping imagery is the process of mapping the data of an image with one projection into a different projection. The IMGREMAP command allows you to do this two different ways:

  1. Using the navigation of a second image
  2. Defining the navigation parameters yourself
When using McIDAS commands to manipulate multiple images, there are many cases where the images must be in the same projection in order for the computations to be performed. For example, in the IR Channel Differencing example, the two images had to be in the same projection (and the same size) for you to be able to run IMGOPER. If you want to manipulate images with different resolutions, the easiest thing to do is to make a copy of one image using IMGCOPY and then remap the second image into that projection using IMGREMAP.

The following exercises use IMGREMAP to create new products.

  1. If a McIDAS session is not already running, start one with at least six frames.

    Type: mcidas

    at the Unix prompt.


GOES East/West Composite

Remapping can also be used to create composites of images. The goal of this exercise is to create a composite of GOES-East and GOES-West that will cover the northern half of the Western Hemisphere. There are actually several different ways to accomplish this goal.

Images needed:

First, copy the images you will need to your local dataset.

  1. Create a local copy of the northern half of the Western Hemisphere topography (TOPO/QUAD) image.

    Type: IMGCOPY TOPO/QUAD MYDATA/IMAGES.3010 SIZE=ALL

  2. Display the image on frame 1 to see the extent of coverage. The image is larger than your screen, so decrease the resolution by a factor of 2.

    Type: EG 1;IMGDISP MYDATA/IMAGES.3010 1 MAG=-2 SF=YES EU=TOPO

  3. Create a local copy of today's 13:00 UTC GOES-West Infrared image.

    Type: IMGCOPY RTIMAGES/GW-IR MYDATA/IMAGES.3011 SIZE=ALL TIME=13:00

  4. Display the image on frame 2 to see the extent of coverage. The image is larger than your screen, so decrease the resolution by a factor of 3. Draw a map on the image.

    Type: EG 2;IMGDISP MYDATA/IMAGES.3011 2 MAG=-3 SF=YES EU=IMAGE REFRESH='MAP'

  5. Create a local copy of today's 13:15 UTC GOES-East Infrared image.

    Type: IMGCOPY RTIMAGES/GE-IR MYDATA/IMAGES.3012 SIZE=ALL TIME=13:15

  6. Display the image on frame 3 to see the extent of coverage. The image is larger than your screen, so decrease the resolution by a factor of 3. Draw a map on the image.

    Type: EG 3;IMGDISP MYDATA/IMAGES.3012 3 MAG=-3 SF=YES EU=IMAGE REFRESH='MAP'


Using IMGREMAP with MERGE=YES option

The IMGREMAP command allows you to merge data from different images during the remapping process. The first example creates a composite by remapping a GOES-East image into the base projection and then remapping a GOES-West image into this using the MERGE=YES keyword to merge the data together. By default, IMGREMAP will overwrite all data in the destination dataset.
  1. Remap the GOES-West IR image into the topography image projection. Use the SMOOTH=YES option to smooth the remap along the limb of the earth.

    Type: IMGREMAP MYDATA/IMAGES.3011 MYDATA/IMAGES.3010 SMOOTH=YES

  2. Display the remapped GOES-West image in frame 2. Decrease the resolution by a factor of 2 so it will fit on the screen.

    Type: EG 2;IMGDISP MYDATA/IMAGES.3010 2 MAG=-2 SF=YES REFRESH='MAP'

  3. Now remap the GOES-East IR image into the previous image and merge the two datasets.

    Type: IMGREMAP MYDATA/IMAGES.3012 MYDATA/IMAGES.3010 SMOOTH=YES MERGE=YES

  4. Display the resulting image on frame 3 centering the image on 30° N, 100° W.

    Type: EG 3;IMGDISP MYDATA/IMAGES.3010 3 LATLON=30 100 SF=YES

    Notice in the upper left corner that you can see where the data were merged.


Using IMGREMAP with MERGE=YES option - Alternate Method

To eliminate the overlap we could create an image that was the eastern half of our base image, remap the GOES-East image into that and then remap the result into the GOES-West image using the MERGE=YES option.

  1. Remap the GOES-West IR image into the base image projection.

    Type: IMGREMAP MYDATA/IMAGES.3011 MYDATA/IMAGES.3010 SMOOTH=YES

  2. Use IMGLIST to find the size of the base image.

    Type: IMGLIST MYDATA/IMAGES.3010 FORM=BAND

    IMGLIST MYDATA/IMAGES.3010 FORM=BAND                                                        
    Image file directory listing for:MYDATA/IMAGES
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
    3010  TOPOGRAPHY     1 JAN 96001  00:00:00    26  100                         
        Band: 1  No Information Available                   10.0  10.0   592 x 1204
    IMGLIST: done
        
    The image size is 592 x 1204. Our new image will be 592 x 602

  3. Create a new image that is the eastern half of the base image.

    Type: IMGCOPY MYDATA/IMAGES.3010 MYDATA/IMAGES.3013 LINELE=0 602 SIZE=592 602

  4. Remap the GOES-East image into this new projection.

    Type: IMGREMAP MYDATA/IMAGES.3012 MYDATA/IMAGES.3013 SMOOTH=YES

  5. Display the remapped GOES-East image in frame 2. Decrease the resolution by a factor of 2 so it will fit on the screen.

    Type: EG 2;IMGDISP MYDATA/IMAGES.3013 2 MAG=-2 SF=YES

  6. Combine the GOES-East remapped image with the GOES-West remapped image.

    Type: IMGREMAP MYDATA/IMAGES.3013 MYDATA/IMAGES.3010 SMOOTH=YES MERGE=YES

  7. Display the result on frame 4.

    Type: EG 4;IMGDISP MYDATA/IMAGES.3010 4 LATLON=30 100 EU=IMAGE SF=YES

  8. Loop between the two composite images.

    Type: LB 3 4;DR 4
    Press: Alt L

    Notice that the clouds over the Gulf of Alaska are better defined because they are not on the edge of the GOES-East view.

    QUESTION: Why to the clouds appear to shift eastward between the first image and the second?

There are a multitude of ways that this compositing can be done in addition to simple remapping. You could use the IMGOPER command to combine two remapped images that corresponded to the two halves (east/west) of the base image. You could use the IMGFILT command to create a mask of portions of the images and then use IMGOPER to combine them. In any of these cases, the commands can be put together into a McIDAS BATCH file or McBASI script to provide a quick method for creating the composites on the fly. Examples of these are:


Spinning Globe

The navigation (projection) of a McIDAS image is defined by the navigation block of the AREA file. The navigation block of a Meteosat image (MSAT) has one of the simplest navigation definitions. The benefit of this simple navigation is that you can change one of the parameters (longitude of the sub-satellite point) to reposition the "view" of the image. This makes it very easy to create multiple views of the earth, from which you can create a spinning globe. Indeed, this is how the topography image used as the base map in the previous examples was created.

Imagery Needed:

The Western Hemisphere topography image (TOPO/WHEMI) is a full disk image that uses the Meteosat (MSAT) navigation. This image has a sub-satellite longitude of 100 West longitude.
  1. Copy the Western hemisphere topography image to position 3000 of your local MYDATA/IMAGES dataset. Because the size of this image is larger than the screen, reduce the resolution by a factor of 3 so it will fit within a 640 x 480 screen:

    Type: IMGCOPY TOPO/WHEMI MYDATA/IMAGES.3000 LATLON=0 100 MAG=-3 SIZE=418 418

  2. Erase the graphics on frame 1 and display the image on frame 1 with the image center at the center of your screen, and draw a map on it.

    Type: EG 1;IMGDISP MYDATA/IMAGES.3000 1 LINELE=209 209 PLACE=CENTER EU=TOPO SF=YES REFRESH='MAP'

  3. Use the LWU command to change the sub-satellite longitude of the navigation block to 0° longitude. Word 70 of the AREA file contains this information. The format for the value is DDDMMSS (longitude*10000). LWU is not an ADDE command and only works on local files. Since we stored this image in position 3000 of our MYDATA/IMAGES dataset which covers AREA0001-AREA9999, the file name is AREA3000.

    Type: LWU POKE AREA3000 0 70

    Note that the previous value is listed as 1000000 (100° W). In McIDAS, West longitude is positive.

  4. Redisplay the image as before and draw a map.

    Type: EG 1;IMGDISP MYDATA/IMAGES.3000 1 LINELE=209 209 PLACE=CENTER EU=TOPO SF=YES REFRESH='MAP'

    Note that the map does not line up with the topography data in the image, but represents a full disk view at 0°. When you change the navigation information, you do not change the data to match the new navigation.

  5. Remap the topography data from the full Earth image (TOPO/GLOB) into the image with the changed navigation. Use the SMOOTH=YES keyword to smooth the limb of the image.

    Type: IMGREMAP TOPO/GLOB MYDATA/IMAGES.3000 SMOOTH=YES

  6. Redisplay the image and draw a map.

    Type: EG 1;IMGDISP MYDATA/IMAGES.3000 1 LINELE=209 209 PLACE=CENTER EU=TOPO SF=YES REFRESH='MAP'

    Note that the data and the map now line up.

  7. Copy the remapped image into the next position in the MYDATA/IMAGES dataset. Keep the image the same size and resolution.

    Type: IMGCOPY MYDATA/IMAGES.3000 MYDATA/IMAGES.3001 SIZE=SAME

  8. Change the longitude of the sub-satellite point to be 90°W.

    Type: LWU POKE AREA3001 900000 70

  9. Remap the topography data from the full Earth image (TOPO/GLOB) into the image with the changed navigation. Use the SMOOTH=YES keyword to smooth the limb of the image.

    Type: IMGREMAP TOPO/GLOB MYDATA/IMAGES.3001 SMOOTH=YES

  10. Display the image in the next frame and draw a map on it.

    Type: EG 2;IMGDISP MYDATA/IMAGES.3001 2 LINELE=209 209 PLACE=CENTER EU=TOPO SF=YES REFRESH='MAP'

  11. Repeat steps 7-10 to create views at 180° W and 90° E.

    Type: IMGCOPY MYDATA/IMAGES.3000 MYDATA/IMAGES.3002 SIZE=SAME
    Type: LWU POKE AREA3002 1800000 70
    Type: IMGREMAP TOPO/GLOB MYDATA/IMAGES.3002 SMOOTH=YES
    Type: EG 3;IMGDISP MYDATA/IMAGES.3002 3 LINELE=209 209 PLACE=CENTER EU=TOPO SF=YES REFRESH='MAP'
    Type: IMGCOPY MYDATA/IMAGES.3000 MYDATA/IMAGES.3003 SIZE=SAME
    Type: LWU POKE AREA3003 -900000 70
    Type: IMGREMAP TOPO/GLOB MYDATA/IMAGES.3003 SMOOTH=YES
    Type: EG 4;IMGDISP MYDATA/IMAGES.3003 4 LINELE=209 209 PLACE=CENTER EU=TOPO SF=YES REFRESH='MAP'

  12. Set the loop bounds for frames 1-4, set the dwell rate to be 3 for each frame, and start the loop.

    Type: LB 1 4;DR 3
    Press: Alt-L

This example can be refined to create a smoother animation by decreasing the longitude difference between successive images (thereby using more images). We have created a McBASI script - GLOBLOOP.MCB which can be used to specify the number of images you wish to use. You cannot display more images than you have frames.

  1. Run the GLOBLOOP McBASI script to create a 6 frame spinning globe.

    Type: GLOBLOOP 6

Additional Exercise: Modify GLOBLOOP.MCB to use the latest Mollweide IR image (RTIMAGES/MOLL-IR) instead of the Global Topographic image to create a spinning globe of clouds.


Table of contents Previous: IR Channel Differencing Next: Masking Features at Land-Water Boundaries