bes  Updated for version 3.20.6
HE2CF Class Reference

#include <HE2CF.h>

Collaboration diagram for HE2CF:
Collaboration graph

Public Member Functions

bool close ()
 closes the opened file. More...
 
string get_metadata (const std::string &metadataname, bool &suffix_is_num, std::vector< std::string > &non_num_names, std::vector< std::string > &non_num_data)
 retrieves the merged metadata. More...
 
bool open (const std::string &filename, const int sd_id, const int file_id)
 openes \afilename HDF4 file. More...
 
void set_DAS (libdap::DAS *das)
 sets DAS pointer so that we can bulid attribute tables. More...
 
bool set_non_ecsmetadata_attrs ()
 
bool write_attribute (const std::string &gname, const std::string &fname, const std::string &newfname, int n_groups, int fieldtype)
 
bool write_attribute_coordinates (const std::string &varname, std::string coord)
 
bool write_attribute_FillValue (const std::string &varname, int type, float val)
 
bool write_attribute_units (const std::string &varname, std::string units)
 

Detailed Description

A class for writing attributes from an HDF-EOS2 file.

This class contains functions that generates SDS attributes and Vdata attributes. Since HDF-EOS2 library API don't have access to field attributes, we need to use generic HDF4 API.

For most HDF-EOS2 files, Grid doesn't use Vdata. Swath has Vdata but fields with Vdata normally contain attributes. However, we still check and provide ways to generate attributes.

Author
Hyo-Kyung Lee hyokl.nosp@m.ee@h.nosp@m.dfgro.nosp@m.up.o.nosp@m.rg

Definition at line 53 of file HE2CF.h.

Member Function Documentation

◆ close()

bool HE2CF::close ( )

closes the opened file.

Definition at line 932 of file HE2CF.cc.

◆ get_metadata()

string HE2CF::get_metadata ( const std::string &  metadataname,
bool &  suffix_is_num,
std::vector< std::string > &  non_num_names,
std::vector< std::string > &  non_num_data 
)

retrieves the merged metadata.

Definition at line 948 of file HE2CF.cc.

◆ open()

bool HE2CF::open ( const std::string &  filename,
const int  sd_id,
const int  file_id 
)

openes \afilename HDF4 file.

Definition at line 955 of file HE2CF.cc.

◆ set_DAS()

void HE2CF::set_DAS ( libdap::DAS *  das)

sets DAS pointer so that we can bulid attribute tables.

Definition at line 181 of file HE2CF.cc.

◆ write_attribute()

bool HE2CF::write_attribute ( const std::string &  gname,
const std::string &  fname,
const std::string &  newfname,
int  n_groups,
int  fieldtype 
)

writes attribute table into DAS given grid/swath name and its field name.

Definition at line 985 of file HE2CF.cc.

◆ write_attribute_coordinates()

bool HE2CF::write_attribute_coordinates ( const std::string &  varname,
std::string  coord 
)

writes coordinates attribute into varname attribute table.

This attribute plays an essential role for two dimensional coordinate system like Swath.

Definition at line 1146 of file HE2CF.cc.

◆ write_attribute_FillValue()

bool HE2CF::write_attribute_FillValue ( const std::string &  varname,
int  type,
float  val 
)

writes _FillValue attribute into varname attribute table.

This attribute plays an essential role for two dimensional coordinate system like Swath.

Definition at line 1052 of file HE2CF.cc.

◆ write_attribute_units()

bool HE2CF::write_attribute_units ( const std::string &  varname,
std::string  units 
)

writes units attribute into varname attribute table.

Any existing units attribute will be overwritten by this function.

Definition at line 1159 of file HE2CF.cc.


The documentation for this class was generated from the following files: