view_hdf

view_hdf is a tool for visualizing and analyzing HDFexternal and HDF-EOS files. Using this tool does not require much knowledge of either HDFexternal or HDF-EOS .

This package contains a detailed document with illustrations of examples. Users should refer to view_hdf.pdf for more details. This page will not explain how to use this tool.

Installation

view_hdf is written in IDLexternal and C. Users need to have IDL installed to run this program. Also, if you want to build the tool from the source code, C compiler is needed.

Pre-built binaries are provided for HPUX, IRIX, Solaris and Digital UNIX. We couldn't find any documents on how to build this program under Linux. Based on the source code contained in the package for Solaris, we wrote Makefile as follows:

Figure 1 Makefile
HDF4DIR=/mnt/hdf/packages/hdf4/v424/Linux_2.6/standard
HDFINC=$(HDF4DIR)/include
HDFLIB=$(HDF4DIR)/lib

HDFEOS2DIR=/mnt/hdf/packages/hdfeos2/v215/Linux_2.6
HDFEOS_INC=$(HDFEOS2DIR)/include
HDFEOS_LIB=$(HDFEOS2DIR)/lib

CC=gcc
LD=gcc

CFLAGS=-I$(HDFINC)

SRCS=get_digital_data.c ies_bds.c
OBJS=$(SRCS:.c=.o)

all: ies_bds_rel2.so

.SUFFIXES: .c.o

.c.o:
$(CC) $(CFLAGS) -c -fPIC $< -o $@

ies_bds_rel2.so: $(OBJS)
$(LD) -shared -Wl,-soname,libies_bds_rel2.so.1 -o libies_bds_rel2.so.1.0.1 $(OBJS)
ln -s libies_bds_rel2.so.1.0.1 ies_bds_rel2.so
Note that HDF4DIR and HDFEOS2DIR are specific to our linux environment. Users need to change these values based on their own environments.

To build the binary from scratch, two object files, ies_bds.o and get_digital_data.o, and one shared object ies_bds_rel2.so were removed.

When make is issued, we noticed that various warnings were reported. Some of them were serious. For example, a function get_digital_namelist in get_digital_data.c has the following code:

Figure 2 Dangerous code
char variable_names[32678];
...
return variable_names;/* Signal an error */
This code can cause undefined behavior. One may find many instances of similar behavior when compiling this tool.

For more information regarding this tool, please check the tool page hereexternal .


Last modified: 11/11/2020
About Us | Contact Info | Archive Info | Disclaimer
Sponsored by Subcontract number 4400528183 under Raytheon Contract number NNG15HZ39C, funded by NASA / Maintained by The HDF Group