ArcMAP 10 Still Struggles with Voids in Some 4-Band TIFF Imagery

ArcMAP 10 Still Struggles with Voids in Some 4-Band TIFF Imagery
December 20, 2011 Mike Tully

Figure 1. Sample images showing black areas displayed as transparent (white) when viewed by ArcGIS v10 SP3.

Aerial Services previously reported (in June 2011) a problem with ArcGIS 10.0.  In that report we described how some 4-band (RGB+IR) TIFF imagery was displayed improperly by ArcMap. Specifically, all pixels having a value of 0 (black) in the IR band were displayed as “null” and appeared as “holes” in the imagery. ESRI responded quickly and fixed this bug in Service Pack 3 (incident #NIM061731).

Aerial Services recently discovered an additional but related problem. The symptoms are almost identical, that is, 4-band TIFF images having black pixels in the 4th band appear “missing” when displayed in ArcGIS version 10 (sp3 build 3600). As before, GeoTIFF tags in the file header are being interpreted by ArcGIS to display these black pixels as “transparent”. Other common image viewer applications display these images properly (without “holes”).

Figure 2. TIFF showing white speckles in the water areas. Specifically, pixel values recorded in the 4th band as "0" or black causes ArcGIS to use that pixel as a "mask" so all other pixels from the RGB bands are rendered transparent.

The details of the problem are important and the reader is directed back to our original article for background on the GeoTIFF header and “tags”. The long and short of it is that many applications that create TIFFs also insert tags into the TIFF header. Not all tags inserted into TIFFs conform to TIFF standards and may or may not be interpreted correctly (or used at all) by other applications displaying the image. No application has to understand every tag.

Some of the GeoTIFF tags for this image are listed below.  The tags were listed by GDAL v1.6 using the tiffinfo command:

TIFF Directory at offset 0x8 (8)
Image Width: 8000 Image Length: 8000
Resolution: 72, 72 pixels/inch
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Extra Samples: 1 (assoc-alpha)
Samples/Pixel: 4
Rows/Strip: 1
Planar Configuration: single image plane
Software: Adobe Photoshop CS Windows
DateTime: 2011:08:10 12:35:43
[more tags here]

ArcGIS is interpreting the highlighted tag “Extra Samples=1 (assoc-alpha)” as a mask pixel. This causes all other pixels at that location (in the RGB bands) to not be displayed. This specific tag is sometimes referred to as the “mask tag” because it’s intended use is to enable certain pixels as masks. Masks are commonly used in applications like Photoshop to produce a variety of useful image effects.

Now as a comparison, when the same image is output using the copy raster tool in ArcGIS, a copy of the GeoTIFF is created but with a new header. The resultant  TIFF tags are:

Image Width: 8000 Image Length: 8000
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Extra Samples: 1 (unspecified)
Samples/Pixel: 4
[more tags here]

An image with Extra Samples set to “1 (unspecified)” displays properly in ARCGIS 10 (Figure 3).

When the GeoTIFF header is “reset” using Global Mapper or Orthovista as above and the Extra Samples tag is set to “1” the problem is eliminated from ArcGIS. We have been able to isolate only a single application that creates TIFF imagery with the Extra Samples tag set to “1 (assoc-alpha)”. The application is GDAL v1.6 using the following command:

Gdal_translate src_dataset dst_dataset

Figure 3. TIFF image displaying without any masks when the Extra Samples tag is set to a value of 1.

There are many commercial and custom applications that use GDAL routines to create 4-band GeoTIFF imagery, therefore, the potential for this problem to exist in your imagery archives or future deliverables is rather high if you (or users of your imagery) are ArcGIS v10 users. The good news is that it is easy to “fix” imagery so it displays correctly in ArcGIS v10 SP3. Simply “reset” the GeoTIFF header using an application like Global Mapper or Orthovista (there are probably many others that can accomplish this and not destroy the other necessary geographic tags in the GeoTIFF header).

It is unclear why ArcGIS 10 SP3 is having difficulty with this tag or that ESRI is improperly interpreting the tag. It is equally unclear if the value of this tag as set by GDAL in the 4th band is incorrect. But the effect is always the same and is undesirable.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*