Digital Mapping Techniques '04— Workshop Proceedings
U.S. Geological Survey Open-File Report 2004–1451
Conversion of a Digital Raster Graphics Image from Color to Black & WhiteOregon Department of Geology and Mineral Industries, 800 NE Oregon Street, Suite 965, Portland, OR 97232; Telephone: (503) 731-0283; Fax: (503) 731-4066; e-mail: email@example.com
A digital geologic map usually, but not always, includes a base map such as a Digital Raster Graphics (DRG) image created by scanning a U.S. Geological Survey quadrangle map. The Oregon Department of Geology and Mineral Industries (DOGAMI) uses JASC Software’s Paint Shop Pro (PSP) to convert the DRG from its color version to black & white. It is rendered as a 1-bit image with no shades of gray; only black for topographic and physical features, and white for the background. In MapInfo Professional (MI), we adjust the percentage of translucency of the DRG, which allows the geology layer (opaque polygons) below the DRG to become visible through the DRG’s background.
At DOGAMI, not every cartographer, geologist, or map is best served by MI’s capabilities, and so Adobe Illustrator (AI) is sometimes used for the final cartography. But the effects of AI’s transparency controls (opacity and blending modes) applied to the DRG may or may not produce a desirable map for presentation. However, if the DRG’s white background is saved with PSP’s transparency before placement in AI, the use of AI’s transparency controls is avoided altogether. As a result, the DRG is a semi-transparent image in AI through which you can “see” the underlying geology.
In a Geographic Information System (GIS), the geologic data gathered through fieldwork is usually, but not always, registered to a Digital Raster Graphics (DRG) image, and attribute information that further explains each of the geologic features is added. A DRG is a raster image file. DRGs are generated from scanned U.S. Geological Survey quadrangle maps, and usually are in TIFF format. A DRG, like a paper quadrangle map, presents the horizontal and vertical positions of features by the use of lines, symbols, and various colors or shading. When it comes to displaying natural and cultural features, there are some commonly-held conventions: water bodies are shown in blue, vegetation in green, relief features in brown, cultural features in brown, and urban areas in red.
We use the DRG as a semi-transparent overlay through which you can “see” the underlying geology layer. For this approach, the DRG works best if it is rendered with a white background, no shades of gray, and all features shown in black — a 1-bit, two-color image. In this paper, the procedure to quickly convert the DRG from its color version to a two-color (actually a black & white) version is discussed. A number of challenges are then addressed, each related to representation of a black & white DRG in Adobe Illustrator (AI). The procedures below are described only to the extent needed for an understanding of the steps. Also, the following text is freely drawn from material already published in instruction manuals and other similar sources.
DECREASING THE COLOR PALETTE
Any image-editing software that allows editing and enhancing of TIFF raster images can successfully transform a DRG into a black & white version. Our choice is JASC Software’s Paint Shop Pro (PSP), a graphics and photo editor. We first used PSP over 10 years ago when it was introduced as shareware.
PSP’s “color correction” tools are easy to master, and can be used to automatically decrease a color range or to selectively replace individual colors. With a single command the color depth of the DRG is decreased to a single bit, thereby saving the trouble of manually replacing colors. But there is a trade-off with this one-step approach—a loss of image quality. The challenge is to reduce the color depth, save time and effort in editing, but to maintain the best possible image quality. A good compromise is to decrease the color depth to a 4-bit image. The resulting image has 16 colors, a manageable number of colors to manually edit, and more pixels are retained that a one-step reduction would otherwise erase. Editing each of the 16 colors is possible through the “Edit Palette dialog box” using the eyedropper tool.
The remaining editing steps are manual, with the first being the replacement of the green color tint that represents the vegetation. Far more tedious editing is required to delete the water body fill (blue color) and other patterns (e.g. tailings, hachured or stippled urban areas) with the erasing tool. It’s a matter of personal choice whether the water fill and patterns are erased from the DRG. For presentation purposes, the DRG certainly looks better without these areas converted to blackened shapes. The final editing step is to return to the “Edit Palette dialog box” and finish replacing the colors that are left in the image to either black or white using the eyedropper tool.
Now the DRG contains only two possible pixel values: 0 and 1—black or white. Black pixels represent topographic and physical features, and white pixels represent the background. With this configuration, the DRG is ready for display in MapInfo Professional (MI), our desktop mapping tool. In MI, you can adjust the percentage of translucency of the DRG, which allows the geology layer (opaque polygons) below the DRG to become visible through the DRG’s background.
Not every cartographer, geologist, or map is best served by MI’s capabilities, and so AI is sometimes used for the final cartography. This part of the paper will focus on the representation of a black & white DRG in AI.
First, adjust the transparency of the DRG in order to see the geology in the layer below the DRG. AI offers two transparency controls — opacity and blending — that can adjust the degree of transparency of the DRG layer, geology, or both. However, applying one or both controls to either the DRG layer or geology can present particularly knotty problems. Some of these problems are:
Fortunately, there is a work-around that avoids the use of AI’s transparency controls. The work-around is possible because PSP’s transparency tag is compatible with AI’s format. Before the DRG is placed in AI, we simply apply PSP’s “set color transparency” function to the DRG’s background (white pixels) for transparency. A tag is added to the DRG indicating that the white pixels have no color. AI does not assign a color value to them. As a result, the geology beneath the white pixels is visible through the DRG’s background. The DRG’s black pixels remain opaque.
Finally, a comment regarding the contrast between the black & white DRG and the geology is needed. The DRG’s black pixels can be more prominently visible than is desired, especially for urban areas, steep topographic relief, or a combination of both. To reduce the intensity of the black pixels, we can use AI’s color palette. With the layer containing the DRG selected, bring the fill box in the toolbar to the front. Click on the fill box and open the color palette menu. As a general rule, we set the K% value (black) to between 50 and 70. This range corresponds to a gray value. As a result, the DRG becomes slightly less prominent, allowing a clearer view of the geology beneath.
Adobe Illustrator, Adobe Systems Inc., 345 Park Ave., San Jose, CA 95110-2704, accessed at http://www.adobe.com/.
Jasc Paint Shop Pro, Jasc Software Inc., 7905 Fuller Road. Eden Prairie, MN 55344-2697, accessed at http://www.jasc.com/.
MapInfo Pro, MapInfo Corporation, One Global View, Troy, NY 12180-8399, accessed at http://www.mapinfo.com/mipro/.