Raster Map Background

Q: How can I add a raster file map as a background to my coverage map in TAP?

A: In TAP 4.5 and later, you can add an image file (.BMP, .TIF, and .JPG) as a background to the TAP Map Window, and include boundary files and coverage studies over that background.

Image files can be obtained from several sources, such as USGS Digital Raster Graphics (DRG) files. A search on the web for "DRG" will probably provide several sources to explore. You can also scan maps yourself, or export maps to one of the supported formats from other mapping software, such as Maptitude or SURFER.

Since TAP includes the ability to define reference points at any locations, you can use any map where you know the coordinates for two or more locations on the map. One of the first images we used for testing the raster map feature in TAP was a map of a large Colorado forest fire scanned from one of the local newspapers. By using approximate coordinates for some of the towns shown on the map, we were able to draw the map in TAP, look at profiles from the command center to various fire locations, etc. Obviously, the more precise the reference points the better, but even approximate locations can be used to get a rough calibration to use the map in TAP.

If you have Maintenance Release 814 or later, the two files used in this tutorial should already be in the IMAGES folder under the folder where TAP is installed:

Display Raster Map

After the coverage study has been completed, use the File|New Map menu to set up the map:

The Map Plot Setup form is displayed:

Add the desired boundary files and coverages with the Add buttons, and set the desired field strength levels with the Levels button:

To add a graphic file as a background, use the browse ("…") button in the Bitmap section of the form. (The "X" button is used to remove the file name if you want to plot a map with no raster background.)

The File Open dialog will be displayed. Find and select the graphic file you want to use, such as the f39101e1.jpg sample file:

Click the Open button to select the file.

On the Map Plot Setup form, click the Plot button to plot the map:

If the graphic file has already been calibrated to define its latitude and longitude references (as discussed below), the image will be displayed in the Map Window:

Note that files with a resolution of more than approximately 4000x4000 pixels may be displayed as monochrome images. The boundary and coverage information added by TAP will still be shown in the colors you specified for the boundary lines and field strength levels.

If you specified coverage(s) to plot, the Map Window will automatically rescale to the coverage area, and the boundary files and computed coverage will be added to the map:

Calibrate Raster Map

Since the image file consists of colored pixels, it is necessary to geo-reference or calibrate the physical pixels of the image file to latitude and longitude values that can be used when mapping boundary or coverage information.

If you specify a graphic image file that has not previously been used (and calibrated) in a TAP system, you will be prompted to specify the calibration information before the image can be used.

For example, you can select the f39104e1_Tutorial.jpg sample file:

When you click the Plot button and the Map Window is displayed, a message will be displayed explaining that no calibration information was found for the file:

Click the OK button to continue with the plot. If you click the Cancel button, the map plot will be cancelled.

When you click the OK button, the image file will be displayed in the TAP Map Window, and you will be prompted to click a location on the map where you want to define a calibration point:

Calibration points can be any identified location or feature on the map where you know the latitude and longitude of the point, such as a map corner, a tower location, highway intersection, etc.

For example, you can define a map corner as the first calibration point by clicking on the upper left (northwest) corner of this sample map. When you click the location, a red register mark will be displayed to identify the location, and a form is displayed for you to enter information about the location:

Fill in the information about the first calibration point. The latitude and longitude of the point are required, but the description is optional. The description may be useful to you later if you want to add more calibration points or refine the pixel location or coordinates of this point.

Click the Continue button to save this calibration point.

You will be prompted for the next calibration point. For example, you can select the lower right (southeast) corner of the map. (You may need to use the scroll bars on the bottom and right of the Map Window to scroll the drawing to the next point.):

You will continue to be prompted for calibration points. When you have finished selecting the calibration points, right-click on the Map Window. (You can later add more calibration points or refine the points you have added as described below under "Recalibrate Raster Map".)

At least two calibration points must be defined on the map. If you right-click with fewer than two points, a warning will be displayed:

You can click the Retry button to select additional points, or the Cancel button to abandon the plot.

If you abandon the plot, or if the selected points are invalid or cannot be read, or other problems are encountered, the plot is cancelled and a warning message is displayed:

The calibration points that are selected (two or more) must be separated by at least 10% of the width and height of the image so the interpolation of locations between the points will be accurate. You can define as many calibration points as desired, concentrating more points in the area of the map where you are working. But the vertical and horizontal range of at least two of the points must represent at least 10% of the dimension of the drawing.

For example, if you select only two points along the top edge of the map, there will not be enough vertical separation to give an accurate interpolation of locations on the map. The following message will be displayed:

You can click the Retry button to add more calibration points, or click the Cancel button to abandon the plot.

When you have selected at least two valid calibration points and right-click on the map, the boundary and coverage information will be displayed, and the Map Window will be zoomed in to the coverage area.

If you only defined a few calibration points (such as the two in this example), you may notice that the mouse location coordinates displayed at the lower left of the Map Window do not correspond closely to the coordinates on the map image. To improve the calibration you can specify additional points or refine the points you already entered. This is described in the Recalibration section below.

 

Recalibrate Raster Map

The pixels of the image file are on a rectangular X-Y grid. For maps that cover a large area, the map coordinate locations are a function of the map projection, earth curvature, and other factors. (Note that the TAP Configuration setting for the Map Projection is ignored when a raster map background is used. The calibration of the map forces the objects plotted to conform to the projection of the map in the raster image file.)

If you want to specify additional calibration points, or modify any of the points you previously selected, click the Calibrate button on the Map Window toolbar.

A form will be displayed showing the current calibration points:

The description, latitude, and longitude you specified for each point are displayed. Also, the X and Y pixel values are displayed. The pixel values cannot be edited, since these are set by clicking on the map.

If you want to add a new calibration point, use the last line in the list (with the asterisk "*" at the left of the row). When you start entering the description or coordinates in the line, a new point is created:

When the record is created the pencil icon to the left of the row indicates the new record. You must move off of the record (by moving the cursor up or down one row) to save the record, indicated by the pencil icon disappearing:

Once the record has been saved, you can select the record by clicking the button to the left of the row so the row is highlighted:

When one or more records are selected, click the "Calibrate Selected" button to click on the Map Window to mark the location.

Note that you can enter the coordinate values first, then click the Calibrate Selected button, or you can click the Calibrate Selected button first to click the map location and then enter the coordinates.

The "Calibrate All" button enables you to click on the Map Window for each of the points in the list. The point description and coordinates will be displayed on the Map Window and the current pixel location will be marked with a red register mark.

Click the X in the upper right of the form to close the Reference Point form. (If you click the Cancel button, the changes made to the calibration points will be discarded.)

After modifying or adding calibration points you must close the map window, then draw the map (from the File|New Map menu) again to use the new calibration:

The additional calibration points will improve the registration between the raster map background and the boundary and coverage information plotted on the map. For example, the line between Arapahoe and Douglas counties from the .BNA boundary file is aligned more closely after the added calibration point (as shown in the red circle) when compared with the same line on the map after the initial calibration using only two points pictured earlier in this article.

 

Copyright 2002 by SoftWright LLC