HL-HDF
hldec.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include "hlhdf.h"

Functions

int main (int argc, char **argv)
 Main function.
 

Detailed Description

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-06-15

Decodes an HDF5 file into a binary data file and an ASCII info file.

hldec [-hdv] -i inputfile -f fieldname -o outputprefix

[-h] Prints an help text.

[-d] Prints debugging information.

[-v] Prints the version number.

-i inputfile Specifies the HDF5 file to be decoded.

-f fieldname Specifies the fieldname to be decoded, e.g. '/dataset1'.

-o outputprefix Specifies the prefix for the output files, the files that will be generated are <outputprefix>.info and <outputprefix>.data.

The file with extension .info will get the following apperance: DATATYPE: [ATTRIBUTE or DATASET] FIELDNAME: [name of the field, e.g. '/attr1'] DATASIZE: [size of the datatype in bytes] DATAFORMAT: [string representation of the datatype, e.g. int] DIMS: [the dimension of the data embraced by [], e.g. [10,10]]

The file with extension .data will be saved in byteformat with native byte order.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Main function.