## NAME

r.in.hdf - Convert data in HDF format into a (binary) raster map layer.
(GRASS Raster Data Import Program)

## GRASS VERSION

4.x

## SYNOPSIS

r.in.hdf
r.in.hdf help
r.in.hdf [-qal] input=name [output=name] [mult=value] [dsets=value[,value,...]]

## DESCRIPTION

r.in.hdf allows a user to create a GRASS raster map layer from a file in NCSA Hierarchical Data Format (HDF).

## OPTIONS

### Flags:

-q
  Run quietly.
-a
  Convert ALL data sets in the HDF file.
-l
  Only list the contents of the HDF file (no conversion).

### Parameters:

input
  HDF file to be converted.
output
  Name of new raster file.
  Default: hdf.rast
mult
  Floating point multiplier. (rastfile = (int)(file.hdf * multiplier))
dsets
  A list of reference numbers for datasets to be extracted.

The raster file created will have its southwest origin at 0 East and 0 North, with resolution of 1. To view the new GRASS raster file, use g.region rast=newfile, then use d.rast as normal. You may wish to manually change the new raster's cellhd file.

NCSA HDF is a multi-object file format developed by The National Center for Supercomputing Applications at Champaign, Illinois for the transfer of graphical and floating-point data between machines. NASA Pathfinder AVHRR data is stored in HDF format. The HDF format defines both a raster type and a SDS (scientific data set) type. The later is basically a highly structured multi-dimensional array of values. A single HDF file may contain more than one SDS or raster; using the -a option will extract all data sets from the HDF file, creating a separate GRASS raster file from each data set and naming the raster files outputname01, outputname02, outputname03.... If the -a option is not specified and the HDF file contains more than one data set, only the first data set is extracted unless the user specifies specific reference numbers for desired data sets in the file using the dsets option. To see a list of reference numbers for data sets in an HDF file, use the -l flag. If the HDF file contains labels or descriptions of the data, these will be shown when using the -l flag. Labels and descriptions from the HDF file will also be written to the GRASS history file when creating the raster map. If a multiplier is given using the mult option, every file created will be the product of the input data set and the multiplier. If the HDF file contains an SDS, it must be only two dimensional in order for r.in.hdf to accept it as input. If the HDF file contains an 8-bit raster image with an associated palette, a GRASS color file will be created. This program will not import 24-bit HDF raster images.

NCSA distributes the HDF library and several public domain visualization applications which use the HDF format. Some commercial applications also support HDF. For more information, use the NCSA anonymous ftp server ftp.ncsa.uiuc.edu or contact:

NCSA
152 Computing Applications Building
605 E. Springfield Ave.
Champaign, IL 61820
(217) 244-0072

## BUGS

If a data set contains long labels and descriptions, some of it may be truncated when writing to the GRASS history file. The GRASS history structure currently allows 50 lines of 80 characters each. But when editing history using r.support, only 20 lines of 65 characters may be used.

## SEE ALSO

r.out.hdf, r.support, g.region

## AUTHOR

Bill Brown, U.S. Army Construction Engineering Research Laboratory

Last changed: $Date: 2002/01/25 05:45:34 $