Follow

Removing the Alpha Channel from Your Orthotiff


Some CAD and GIS software applications may have issues when non-visual channels or bands are contained on images. The following document outlines the process to remove alpha channel from your orthotiff so it can be more compatible with certain CAD software applications such as Microstation, ArcGIS 3.x, Cadcorp SIS and Intergraph.

Requirements

  • Orthotiff with alpha channel (in this article we will be using a file called "ortho_old.tif" as the example orthotiff)
  • Installed GDAL tools

What to do

Open a command line (terminal) and type the following command to take a look at the image metadata:

gdalinfo ortho_old.tif

It will output as shown below:

Band 1 Block=15130x1 Type=Byte, ColorInterp=Red
  NoData Value=-10000
Band 2 Block=15130x1 Type=Byte, ColorInterp=Green
  NoData Value=-10000
Band 3 Block=15130x1 Type=Byte, ColorInterp=Blue
  NoData Value=-10000
Band 4 Block=15130x1 Type=Byte, ColorInterp=Alpha
  NoData Value=-10000

Band 4 is the alpha channel that must be removed. To do so, a new file must be created. Type the following in the command line (terminal):

gdal_translate -b 1 -b 2 -b 3 ortho_old.tif ortho_new.tif

The above command "gdal_translate" takes only the first 3 bands of the image and creates a new one called "ortho_new.tif." The resulting image will be more suitable for use with older CAD and GIS software applications.

Recommendations

It is recommended that a World File be added to the image in order to make it more compatible with older CAD and GIS software applications since they often don't read the geotag embedded on the file. To do this, add a flag during translate:

gdal_translate -b 1 -b 2 -b 3 -co "TFW=YES" ortho_old.tif ortho_new.tif

A World File or .TFW file is a plain text file that accompanies every .TIF file and contains upper left corner, resolution, and rotation of the image but no information regarding the georeference system.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk