Home Page
FAQ
Publications
Documentation
Software
Movies
Image Gallery
Image Data
Data Search
Derived Products
Related Links
Contact Us
SCP FTP site

GEOTIFF generation from BYU-MERS "SIR" image format


This document briefly describes how to convert a standard BYU .SIR file to a GeoTIFF file.

The BYU-MERS "sir" image format was developed by the Brigham Young University (BYU) Microwave Earth Remote Sensing (MERS) research group to store images of the earth along with the information required to easily earth-locate the image pixels. The binary SIR file includes a header with all the information to geolocate each pixel in the image. The origin of the .SIR file image is in the lower left corner. The earth location of a pixel is identified with its lower-left corner. Most sir files are in either polar stereographic or Lambert equal-area projections, though some EASE grid images are regularly produced.

To facilitate creating GeoTiff files, three utility programs, written in C have prepared, sir2geotiff.c, sir2geotiff2.c, and sir2geotiff_gdal.c. These are designed to be easily compiled and run on a variety of platforms and only require C code from the BYU SIR C library (see below). Note that the latest revision of sir_util2.c can also generate TIFF and GeoTiff images. sir_utils is available as a pre-compiled windows executable program.

The sir2geotiff_gdal.c program uses the GDAL library its utility program gdal_translate is used to create geotiff files. It is further documented on a separate webpage.

The sir2geotiff.c and sir2geotiff2.c programs are self-contained and should compile on most platforms. sir2geotiff.c supports only greyscale images while sir2geotiff2.c supports color tables and additional options. Note that both programs only support GeoTIFF creation from polar stereographic or Lambert equal area projection files; otherwise, the output images are conventional TIFF images.

Both programs require specification of the input .SIR file. Optionally, you can specify the output file name and the max/min scaling parameters. Internally, the SIR values are clipped to the max and min values, then converted to 8 bit values spanning this range.

The sir2geotiff2 program can include a color table specified by an external file. Optional parameters specify if the color table file is in binary or ascii format, that a tiff should be generated instead of a geotiff, and is the lowest value of the color scale should be reserved for the no-data flag used in the SIR file.

Usage: sir2geotiff input_filename output_name min max
  converts a polar stereographic .sir file to geotiff file
  input_filename : input BYU .sir file
  output_name : optional name of output geotiff file [def=filename.tif]
  min,max : optional min,max [def=from sir header]

Usage: sir2geotiff2 <-b -q -t -n -h> input_filename output_name min max coltabfile
Converts a BYU .sir file to geotiff or tiff file
  input_filename : input BYU .sir file
  output_name : optional name of output geotiff file [def=filename.tif]
  min,max : optional min,max [def=from sir header]
  coltabfile : optional ascii color table file [def=grayscale]
  Optional dash arguments
   -b : binary color table file [def=ascii]
   -q : quiet [def=verbose]
   -t : output only standard TIFF file not a geotiff file [def=geotiff]
   -n : only no-data pixels at lowest output value [def=no-data flag ignored]

Source for for the programs is at ftp://ftp.scp.byu.edu/software/sir2geotiff/. To compile the programs require the c SIR libraries available ftp://ftp.scp.byu.edu/software/c/ Be sure to set the SWAP value in sir3.h.

To link sir2geotiff use something like

cc -O -I ./ -o sir2geotiff sir2geotiff.c sir_io.c sir_geom.c sir_ez.c

The Marine Geospatial Ecology Tools (MGET) project (also known as GeoECho Python) has developed an open source geoprocessing tool box that enables conversion of BYU SIR files into ArcGIS raster format files.