Data visualization using openev

The goal of this exercise is to demonstrate how to use Openev to visualize WELD .tif products.

The data are stored at /home/user/ost4sem/exercise/weld_data_processing/x6JIatZlSUMMER2008

Set your working directory:

DIR=/home/user/ost4sem/exercise/weld_data_processing/x6JIatZlSUMMER2008
cd $DIR


Create a stack image

In this exercise we will visualize the WELD red, green and blue wavelength bands as a true color image by displaying them on the red, green and blue monitor channels. Openev requires multiple bands to be stored together as a stack image, the WELD FILL values (no data values) are designated with a pixel value of -32768 so we need to ignore them when we generate the stack image as:

gdal_merge.py  -separate -n -32768 -co COMPRESS=LZW $DIR/Band3_TOA_REF.TIF $DIR/Band2_TOA_REF.TIF $DIR/Band1_TOA_REF.TIF -o $DIR/Band321_TOA_REF.tif

We will now visualize the stack image as:

openev $DIR/Band321_TOA_REF.tif &

We can change the minimum and maximum values that are displayed for each band (this is called contrast stretching) to better visualize the data by right clicking on the layers window:


We can change the band order (Red Band:3, Green Band:2, Blue Band:1) or change the minimum and maximum values as below. Remember to press the keyboard enter every time that you insert a value.


Create a log-stretch stack image

For better visualization we can display the natural logarithm of the 3 WELD bands. We can use gdal_calc.py to calculate the log of each band as:

gdal_calc.py -A $DIR/Band3_TOA_REF.TIF --calc "log(A)" --NoDataValue -32768 --type Float32 --outfile  $DIR/Band3_TOA_REF_ln.tif
gdal_calc.py -A $DIR/Band2_TOA_REF.TIF --calc "log(A)" --NoDataValue -32768 --type Float32 --outfile  $DIR/Band2_TOA_REF_ln.tif
gdal_calc.py -A $DIR/Band1_TOA_REF.TIF --calc "log(A)" --NoDataValue -32768 --type Float32 --outfile  $DIR/Band1_TOA_REF_ln.tif

Then we can stack the log bands together as:

gdal_merge.py  -separate -n -32768 -co COMPRESS=LZW $DIR/Band3_TOA_REF_ln.tif $DIR/Band2_TOA_REF_ln.tif Band1_TOA_REF_ln.tif -o $DIR/Band321_TOA_REF_ln.tif

We will now visualize the stack image as:

openev $DIR/Band321_TOA_REF_ln.tif &

We can change the minimum and maximum values that are displayed for each log band by right clicking on the layers window:


This web site is hosted at the Geographic Information Science Center of Excellence (GIScCE), South Dakota State University.
The contents of this web site were written by the GIScCE WELD staff. This site was last updated Decmeber 3rd 2012.