14

Displaying Images
 
 

Working with Images

There are a great variety of images that can be of use in your GeoMedia workflows. These include aerial photos, satellite images, and a broad range of scanned maps. These images serve as valuable visual reference sources to make your maps more useful. They also serve as the basis for the creation of new data as you perform "heads-up" digitizing of features in the image.

This chapter explains how to get existing images into GeoMedia and how to display and manipulate them with your other data. GeoMedia can access images in more than three dozen formats. Details on format are provided later in this chapter. If the imagery is already georeferenced, that is it has geographic coordinates as part of its file structure, the image will automatically be placed in the proper location in the map window. If the image does not have geographic coordinates as part of the internal file data, you have to either create a coordinate system file or interactively place the image at the proper location.

Adding an Image to a GeoMedia Workspace

In order to add imagery to your current workspace you must have a connection to a read/write warehouse. For imagery, the only thing placed in the warehouse is the full path of the file system location of the image file. You do not actually place the image in the warehouse. Any read/write warehouse can be used to store path information for the imagery file data. If the imagery you are using were associated with existing spatial data in one of your warehouses, that warehouse would probably be the best place to add the imagery path information. If you are working with data from read-only warehouses, you will have to open a read/write warehouse in which to place the imagery information.

The projection of the read/write warehouse has no effect on the imagery file data placed there. If you will be working with a lot of imagery or using the workspace extensively, you may wish to create a special warehouse for the imagery locations. In any event, if you want to display the imagery later, you must be connected to the warehouse.

Once you have connected to a read/write warehouse, to add an image to the current map you must access the Image dialog from Insert command on the Main Menu bar. If you are not connected to a read/write warehouse, the Insert Image menu choice will be grayed out and not accessible. Selecting this option brings up the Insert Image dialog, shown in the first illustration at left.

If you know the full path of the file, you can simply type it in the Image Name field. Generally you will need to use the Browse button to locate the file. There is one important thing to remember when using the Browse button: as is always true in file browsers, the browser is set to look for files with a particular extension. The default extension for the Browse for Image File dialog are files that have extensions of .cit, .cot, .crl, .rgb, .rle, and .tg4. If your file is a.giff formatted file, it will not be shown in the browse dialog unless you select file extensions of that type from the drop-down dialog in the lower portion of the Browse for Image File dialog. An example is shown in the second illustration at left.

When you have entered a valid image file name into the dialog and pressed Open, or double clicked on it with your mouse, the Browse for Image File dialog is dismissed and the file name and full path are loaded into the Insert Image dialog. Depending on the type of file, one, two, or all three of the radio buttons under the Placement mode area of the dialog will be available. One option should be selected. The radio buttons indicate the ways in which the image is to be located in the map window.

Map Window Image Placement

There are three ways to place an image in a map window; Interactive, Georeferenced, or By header. Different file formats allow one or more of these options. The section that follows provides an overview of these methods.

An Overview of Placement Options

Images that have georeferenced data contained within the file, such as GeoTiff, can be placed using the Interactive or the Georeferenced option, which is the default. Files that have a header file with information about their location (e.g., Intergraph image types such as .cot and .rle) can be placed either interactively or by using the header option. The placement by header option means that you will provide a file location for the file that contains the geographic data, either a design file (.dgn) or a coordimate system file (.csf) file.

Many file types have neither internal geographic data nor a header file (e.g., .bmp, .jpg, and normal .gif). For files of this type, you must select the interactive option. Choosing the interactive option means that you will use the mouse to indicate the location where the image will be placed. The table that follows lists the image formats supported in GeoMedia, and the type of placement option associated with each.

Raster Formats Supported in GeoMedia

Place Codes

G = Georeferenced (if georeferencing information is available)

W = Georeferenced through World File support (*.tfw, *.sdw, *.jgw)

H = By header (requires .csf or .dgn file)

I = Interactively

* With or without geo-tie application packets
 
 
 
Format/Type Ext. Comp. Tiles Bits Main Use/Notes Place
 
Bitmap 1 .bmp - No 1 B/W I
Bitmap 2 .bmp - No 8 Greyscale I
Bitmap 9 .bmp RLE No 1 B/W I
Bitmap 28 .bmp - No 24 RGB color I
Bitmap 29 .bmp RLE, PB No 8 Greyscale I
CALS 24 (1A) .cal CCITTG4 No 1 B/W high-res line drawings I
CALS 24 (1B) .cal CCITTG4 No 1 B/W high-res line drawings I
CALS 24 (2B) .cal CCITTG4 Yes 1 B/W high-res line drawings I
GeoTIFF .gif   Yes   Georeferenced TIFF G, I
GIF .gif LZW No 8 Palette color I
Hitachi 1 .hrf - No 1 B/W AutoCAD applications I
Hitachi 2 .hrf - No 8 Greyscale AutoCAD applications I
Hitachi 9 .hrf RLE No 1 B/W AutoCAD applications I
Hitachi 27 .hrf RLE No 24 Color AutoCAD applications I
Hitachi 28 .hrf - No 24 Color AutoCAD applications I
Hitachi 29 .hrf RLE, PB No 8 Greyscale AutoCAD applications I
IGS 9 .rlc RLE No 1 B/W advanced CAD applications I
IGS 29 .igs RLE No 8 Greyscale advanced CAD applications I
Intergraph 2* .cot - Yes 8 Greyscale G, H, I
Intergraph 9 .rle RLE No 1 B/W G, H, I
Intergraph 24* .cit  CCITTG4 Yes 1 B/W facsimile images  G, H, I
Intergraph 27* .rgb RLE Yes 24 RGB color  G, H, I
Intergraph 28* .rgb - Yes 24 RGB color  G, H, I
Intergraph 29* .rgb RLE, PB Yes 8 Greyscale G, H, I
Intergraph 30*   JPEG Yes 8 Greyscale G, H, I
Intergraph 31*   JPEG Yes 24 RGB color G, H, I
JFIF .jpg JPEG No 8 Palette color I
PCX 9 .pcx RLE No 1 B/W I
PCX 27 .pcx RLE No 8 Palette color I
PCX 29 .pcx RLE, PB No 8 Greyscale I
TIFF 1 .gif - Yes 1 B/W I
TIFF 2 .gif - Yes 8 Greyscale I
TIFF 9  .gif LZW, PB Yes 1 B/W I
TIFF 24  .gif CCITTG4 Yes 1 B/W facsimile images I
TIFF 27  .gif LZW, PB Yes 24 RGB color I
TIFF 28  .gif - Yes 24 RGB color I
TIFF 29  .gif LZW, PB Yes 8 Greyscale I
USGS DOQ .doq None No 8 OrthoQuads G,I
MrSID .sid Wavelet Yes 8/24 Greyscale/RGB G,I
ESRI .bip None No 8 Satellite data G,I
ESRI .bil None No 8 Satellite data G,I

It is also possible to use the interactive placement option to add images to the map window that are not, in fact, geographic in nature. For example, you might want to add a logo or a photo of a house or project site or other graphic to the window. These image applications require that you use the interactive option. Once an image is added to the map window, GeoMedia treats it as if it is geographic data. That is, if you zoom out, the graphic gets smaller; if you zoom in, the graphic gets larger.

If they are to be used for geographic purposes, the images used by GeoMedia must already be geometrically correct. For example, aerial photos must have been photogrammetrically processed and re.gified, or must be orthophotos.

Interactive Placement of Images

For images that do not have internal georeferencing, or for files that need coordinate data, such as .jpg or .bmp file formats, you can interactively indicate where the image is to be placed in the map window. For the images that do have georeferencing data, you can also use interactive placement. This might be useful if you simply wanted to add an image to the window (not in its geographic location) for information purposes.

On the Insert Image dialog, if the Interactive radio button is selected, you will use the mouse to indicate where the image is to be placed in the current map window. You indicate the area by pressing and holding down the left mouse button while drawing the box.

As you draw the box, you will note that the box you are drawing does not necessarily follow the mouse. The aspect, the ratio of the bottom/top width to the length of the sides, of the image is defined by the image size, not by the dimensions of the box you are drawing. Essentially you are designating one corner and as you move the mouse the box adjusts to maintain the aspect of the image. When you have the image properly located, release the left mouse button and the image will draw.

As you are drawing the box, be sure that not only have you gotten a single corner properly located but that the geographic extent of the image box is correct. The image will be sized to fit into whatever box size you draw. If you do not properly locate the opposite corners of the image, it may cover a larger or smaller geographic area than is correct. The image will be visually correct but the coordinates of any location on the image will be incorrect. Of course, this does not apply if you are placing the image as a visual reference or logo.

When you place an image interactively you can draw a box that is aligned with the map sides only. Images placed with either internal georeferencing or with headers can be skewed to line up with the map projection currently applied to the workspace (see the material that follows for more details on this), but this option is not possible for interactively placed images.

Moving Placed Images

Once an image has been placed into a map window, by any of the methods, it can be moved but it cannot be resized. To move an image, you must first select it with the mouse, or click on the image’s entry in the Legend and then click on Edit > Select by Legend Entry from the Main Menu. Once the image is selected, you should click on the Move icon on the Placement and Editing Toolbar (the double-headed arrow), or access the move capabilities though the Edit > Move command on the Main Menu bar.

In either case, large black handles will appear at the corners of the image. You can use these to move the image with your mouse. As you move the image, note that the mouse cursor changes as you move within snapping distance of other features. This will give you a visual clue as to the location of the image. Note that the image does not actually snap to the other features. For further details on snapping, see Chapter 26.

Georeferenced Image Placement

A number of image formats have the location of the image as part of the image file. An image must have valid GeoTiff tags, a valid GeoTIE packet, or an associated world file (*.tfw, *.sdw, or *.jgw) to be inserted Georeferenced. A common image format with this structure is the GeoTiff format. GeoTiff is very similar to the well known Tagged Image Format .gif) file used by many graphics software packages. GeoTiff extends this structure and adds geographic coordinate information.

To insert a GeoTiff and place the image, you only need to ide.gify the file name in the Insert Image dialog box. The Georeferenced radio button is selected and, when you click on OK, the image will be properly placed.

 NOTE: You can select the Interactive option if you want to place a GeoTiff. Information and Sources of GeoTiff Images

In the last few years the GeoTiff file format has been widely adopted as one way to organize geographically referenced image data. Many software providers who process images support GeoTiff as an output option. A Web page discussing GeoTiff can be found at http://home.earthlink.net/~ritter/ge.giff/geotiff.html. Sample GeoTiff images can be found at ftp://ftpmcmc.er.usgs.gov/release/ge.giff. The technical specifications on GeoTiff can be found at http://mcmcweb.er.usgs.gov/drg/ ge.giff.pdf.

NOTE: You will need the (free) Adobe Acrobat reader to access the file. Currently USGS Digital Raster Graphics (DRG) and Digital Ortho Quarter Quads (DOQQ) are provided in GeoTiff format. DRGs and DOQQs are discussed in material that follows.

USGS Digital Ortho Quarter Quads

A very valuable image type for people working in the United States is the USGS DOQQ. Production of these images began in 1991 and there are currently more than 50,000 DOQQs available. The USGS plans to provide DOQQs for the entire United States. The current geographic status of DOQQs can be obtained from http://mcmcweb.er.usgs.gov/status/doq_stat.html.

A DOQQ covers the geographic area of one-fourth of the standard USGS 7.5-minute map. Technical information on DOQQs can be obtained at http://mapping.usgs.gov/www/ndop. DOQQs are distributed in the Universal Transverse Mercator (UTM) projection and coordinate system based on the NAD83 datum. To most accurately display a DOQQ, the workspace should be given this projection.

 NOTE: Make sure you have the proper UTM zone selected as well. Documentation on the USGS GeoTiff format for DOQQs is provided at http://mcmcweb.er.usgs.gov/sdts/ge.giff.html. Sample GeoTiff DOQQ files can be obtained at ftp://ftpmcmc.er.usgs.gov/ release/viewers/sample_data. Note that DOQQs are large files, generally around 48 MB. Placing an image this large will require that your system have a substantial amount of memory. Do not be surprised if actions such as zooming or moving are slow.

Using a DOQQ is a simple process of selecting Insert > Image and browsing to the file location.

2NOTE: Make sure you have the.gif file extension selected. Because the DOQQ contains all of the necessary georeferencing data, the Georeference radio button should be selected. You only need to click on OK to place the image. A sample DOQQ is shown in the following illustration.

Fig. 15-3

The Rolla MO DOQQ as downloaded from USGS. Note detail in second map window.
 
 

USGS Digital Raster Graphic Images

A second useful source of images in the United States also available in GeoTiff format is the USGS Digital Raster Graphic (DRG). The DRG is essentially an image copy of the standard USGS 7.5-minute quadrangle map (often called a topo map). The technical specifications and details on the DRG can be accessed at http://mcmcweb.er.usgs.gov/drg/geninfo.html. Essentially the entire United States has complete DRG coverage. A status map is available at http://mcmcweb.er.usgs.gov/drg/avail.html. DRGs can be purchased from the USGS, and some are available online at no cost from providers listed on the status map page.

Accessing and placing a USGS DRG follows exactly the same steps as described for the DOQQ. You simply need to start the Insert Image dialog from the Main Menu and click on Insert > Image; then browse to the proper file and click on OK. The DRG should be properly positioned.

The DRGs are produced by the USGS in the UTM projection. The datum used (NAD27 or NAD83) will be different for different DRGs, but will be the same as the published map. The datum can be viewed (if you zoom in enough) on the lower left of the map, as shown in the following illustration.

Fig. 15-4

Placing Images That Have Associated Header Files

There are a number of image types that have their geographic information located in an associated file. Many of the Intergraph image file formats (e.g., .cots and .rle) have the geographic data in a MicroStation .dgn file, which has a data component called an element type 56. This is the data component of the file that contains the geographic information.

To place a file that has such header information, you first need to select the desired image file. When you have done so, the Insert Image dialog will have both the Interactive and By header options available. If it is not already selected, select the "By header" radio button. This will make the Browse button beside the "Coordinate system information file" dialog box available. With the file browser options you then select the .dgn file associated with the image. When the file is selected, you can click on OK on the Insert Image dialog and the image will be properly inserted.

In addition to a .dgn file with a type 56 component, a coordinate system file (.csf) can also be used to associate an image file with the proper geographic coordinates. The coordinate system file needs the appropriate projection and origin data, and can be created as described in Chapter 39. The .csf file will be entered into the "Coordinate system file" dialog the same way a .dgn file would be. After the file is selected, you click on OK to place the image.

An image might also be georeferenced with an associated world file, *.tfw, *.sdw, or *.jgw. Files of this type include ESRI images, Tiff files, and some JPEG files. World files contain the parameters necessary to define an affine matrix that will transform the image to the desired geographic location in a specific coordinate system. They do not, however, contain coordinate system information. If an image is inserted as Georeferenced with a world file, then you must also specify a coordinate system information file or design file, as discussed above, to provide the correct coordinate system definition for the image.

Placing Intergraph Image Files

The process of transformation of an Intergraph file such as .cot or rle has two components. Each of the files has an internal header that includes basic information about the file. The key information associated with the placement of the file, however, is the transformation matrix. This matrix is a 4 x 4 set of values stored in the header that relates the image’s pixels to a set of real-word coordinates stored in the .dgn file or the .csf file.

The transformation matrix values indicate how much, if any, the image is offset from the coordinates in the header file. They also indicate whether or not the image is to be rotated or otherwise transformed. GeoMedia applies an affine transformation to the image data. An affine transformation will allow an image to be scaled, stretched, rotated, skewed, or shifted. There is more on image transformations later in this chapter.

3 TIP: You can use MGE to determine the projection information associated with any .dgn file that has a type 56 component. Start up MGE and access any MGE project. Then go to Map > Open and open the .dgn file in question. MicroStation will be started through MGE. Select Applications > MCSO > File > Coordinate System > Primary. The resulting dialog box will show you the projection information for the file. Reusing Placed Images

It is not necessary to repeatedly insert the same image into a warehouse in order to view it later. Just like a normal feature, once the image path is inserted in the warehouse, it can be added to any map widow through use of the Legend > Add Image dialog. 

Avoid inserting the same image more than once into a warehouse. Delete the copies if you have. If you should accidentally insert the same image repeatedly into a warehouse, the image will have a sequential number (e.g., image1, image2, and so on) added to its name. If you have inserted the same image twice, you should delete it from the warehouse by selecting it in the map window with the mouse or from the legend and clicking on the Delete icon on the Placement and Editing Toolbar (the slashing X). You cannot delete an image through the Edit > Delete Geometry menu option.

When you have the same image inserted more than once in the same warehouse, and you delete one copy, you will probably encounter a GeoMedia error message that says "GRecordset is invalid do you want to continue loading remaining legend entries?" Click on OK and proceed.

Managing Images

A new utility is available with the 4.0 release of GeoMedia that makes it easy for you to manage the image path information stored in your warehouses. The Warehouses > Images command allows you to review, modify, and delete path information. The dialog is shown in the following illustration. The Image dialog shows you all the file system paths stored in a selected warehouse connection. Choose a connection and a path and the Images command will check the path information. If the path is no longer valid, say the image file was moved to a new directory, the Update command will be enabled. It takes you to an Open dialog that allows you to browse to the new file location and update the path stored in your warehouse. The Delete button is always available allowing you to remove paths from your warehouses.

Tip: An alternative to the common path designation in the format Drive:\directory\Subdirectory\FileName is the UNC path designation. Its format is \\MachineName\Directory\Subdirectory\FileName. Using this format might help eliminate the need to update path information on networked systems with mapped drives.

New graphic hgm14_1.gif

Caption: The Images dialog.

Enhancing Images

The Image Display tool is used to adjust the contrast and brightness of greyscale and color images you have inserted into your GeoMedia workspace. You access the Image Display dialog by clicking on the image style key on the Legend. Alternatively, right clicking on the image in the map window allows you to run the Legend Properties dialog, which also gives you access to the Style dialog. Different options available to you depending on whether the image is color or greyscale, or binary map (e.g., a map with black lines and white background). The enhancements you apply with these dialogs have no effect on the image files. They only change the way they are displayed in the map window.

Enhancing Greyscale and Color Images

Image Display allows you to adjust the contrast and/or brightness by moving a horizontal or vertical line in the dialog to the left or right for brightness or up or down for contrast. You can also type in values in the fields, as shown in the following illustration. As you change the values, you can preview the results by clicking on the Preview button. If you do not apply the changes by clicking the OK button, any changes you make are temporary. When you exit the dialog, any preview changes will revert back to the original.

Fig. 15-5

An original greyscale image (left top), and the image after being adjusted for contrast and brightness. In addition to grabbing the lines and moving them with your mouse, you can simply click the mouse somewhere in the Image Display window. Both lines will then jump so that they intersect at the location of the mouse click. Again, however, you will need to click on Preview to see the effect.

The Image Display tool also allows you to invert an image. When you do this with a greyscale map, you can change a positive image to a negative; that is, black becomes white and white becomes black. In color maps, a more complex transformation occurs, and you should preview the results with any selected color map. None of the image adjustments discussed here affect the image file itself.

Enhancing Binary Images

If the images are binary images, there is a different set of options possible. It is possible to make the foreground and backgrounds any color. The background can be made transparent, and the image can be inverted.

Setting the background color to transparent is done by clicking on the Transparent checkbox. The example shown in the following illustration is a scanned parcel map. Setting the background to transparent will allow you to "float" the map over an aerial photograph or other map to compare the boundaries and possibly update them.

Fig. 15-6

If you do not want the background transparent, clear the Transparent checkbox. You can then assign any color to the background and the foreground. Selection of the background and foreground colors is done through a standard color dialog accessed by clicking on either the Set Foreground Color or Set Background Color button.

2 NOTE: The Set Background Color icon will be dimmed if the Transparent checkbox is checked. Checking the Invert Image checkbox will switch the background and foreground colors, as shown in the following illustration. Note that the Invert Image and Transparent checkboxes cannot be applied simultaneously. In addition, there is no preview capability for binary maps. You must click on OK to see the effect of any changes.

Fig. 15-7

Images and Map Projections

Images placed using a header file information or internal georeferencing (e.g., GeoTiffs) can be changed substantially from their standard rectangular format to meet the demands of differing map projections. The following two illustrations show how the same GeoTiff (a USGS DRG) can be displayed in very different ways based on the workspace projections applied.

Fig. 15-8

Fig. 15-9

These examples are extreme to illustrate the point. In the first of the two previous illustrations, the DRG is a grid of quadrangle boundaries. The nearby county and state boundaries are shown in the detailed view and in the overall map. The projection applied is a Transverse Mercator, approximately the same projection as the original DRG, so there is relatively little modification.

In the second of the two illustrations, the same areas are shown, but in a Lambert projection. The origination latitude and longitude for the image have been intentionally selected to demonstrate the extreme skew applied to the image. The following two illustrations show the same projections but provide a detailed view of the images.

Fig. 15-10

Fig. 15-11

The type of transformations shown in the previous two illustrations can be applied only to images that are internally georeferenced (e.g., GeoTiffs) or that contained header files with coordinate system information (e.g., Intergraph file formats such as .cots and .rle).

Imagery and Coordinate Systems

As the previous illustrations show, it is possible to substantially transform imagery to different map projections. If the highest degree of accuracy is necessary, however, it is generally best to make sure that the imagery and the warehouse correspond in their projection specifics. For example, the particular DRG used in the examples was derived from a map that was UTM Zone 15 and NAD 27.

If precision is critical, the original raster projection data should be the coordinate system assigned to the workspace. It is a general rule of thumb that vector data is more likely to maintain its correct location when it is reprojected. If you are overlaying vector data, such as roads, on raster data, like aerial photography, it is probably best to set your workspace to the coordinate system of the imagery and allow the vector data to be reprojected from its original coordinate system, rather than the reverse.

Using Image Transformations Effectively

Although the previous examples indicate that massive transformations are possible, and that you should be cautious in how you transform imagery, GeoMedia’s ability to transform images is a very valuable capability. Imagery is essentially a rectangular grid of values. With each value corresponding to a light intensity represented by a value on a greyscale or by a color. When the grid is small relative to the earth’s surface, the grid and the surface fit well together and the process of transformation can be very valuable.

The GeoTiff and header-based files formats have an affine transform applied to them to properly position them with respect to any coordinate system. If the grid of values that constitute the image cover a larger area relative to the surface of the earth, transformations such as that applied here cannot always "correct" for the limitations of the grid. In this case, there may be increasing differences between correct coordinates and the ones associated with the imagery. In a situation in which you are trying to integrate data from imagery with differing source coordinate systems, and the imagery covers a relatively small portion of the earth’s surface, the transformation capabilities of GeoMedia can merge the different data and allow you to create an integrated set of maps.