|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
DAP attributes and structure description generation code. More...
#include "config_hdf.h"#include <cstdio>#include <cassert>#include <libgen.h>#include <string>#include <fstream>#include <iostream>#include <sstream>#include <algorithm>#include <numeric>#include <functional>#include <unistd.h>#include <sys/types.h>#include <dirent.h>#include <iomanip>#include <mfhdf.h>#include <DDS.h>#include <DAS.h>#include <escaping.h>#include <parser.h>#include <InternalErr.h>#include <debug.h>#include <BESDebug.h>#include <BESLog.h>#include "hcstream.h"#include "hdfclass.h"#include "hcerr.h"#include "dhdferr.h"#include "HDFArray.h"#include "HDFSequence.h"#include "HDFTypeFactory.h"#include "HDFGrid.h"#include "dodsutil.h"#include "hdf-dods.h"#include "hdf-maps.h"#include "HDFByte.h"#include "HDFInt16.h"#include "HDFUInt16.h"#include "HDFInt32.h"#include "HDFUInt32.h"#include "HDFFloat32.h"#include "HDFFloat64.h"#include "HDFStr.h"#include "HE2CF.h"#include "HDFSP.h"#include "HDFSPArray_RealField.h"#include "HDFSPArrayGeoField.h"#include "HDFSPArrayMissField.h"#include "HDFSPArrayAddCVField.h"#include "HDFSPArray_VDField.h"#include "HDFCFStrField.h"#include "HDFCFStr.h"#include "HDFCFUtil.h"
Go to the source code of this file.
Macros | |
| #define | ATTR_STRING_QUOTE_FIX |
| #define | HANDLE_CASE(tid, type) |
| #define | HANDLE_CASE(tid, type) |
| #define | HANDLE_CASE(tid, type) |
| #define | SIGNED_BYTE_TO_INT32 1 |
Functions | |
| void | AddHDFAttr (DAS &das, const string &varname, const vector< hdf_attr > &hav) |
| void | AddHDFAttr (DAS &das, const string &varname, const vector< string > &anv) |
| void | change_das_mod08_scale_offset (DAS &das, HDFSP::File *spf) |
| int | check_special_eosfile (const string &filename, string &grid_name, int32 sdfd, int32 fileid) |
| void | hdfeos_delete_buffer (void *buffer) |
| yy_buffer_state * | hdfeos_scan_string (const char *str) |
| void * | hdfeos_string (const char *yy_str) |
| void | hdfeos_switch_to_buffer (void *new_buffer) |
| int | hdfeosparse (libdap::parser_arg *arg) |
| template<class T > | |
| string | num2string (T n) |
| void | read_das (DAS &das, const string &filename) |
| bool | read_das_hdfhybrid (DAS &das, const string &filename, int32 sdfd, int32 fileid, HDFSP::File **h4filepptr) |
| bool | read_das_hdfsp (DAS &das, const string &filename, int32 sdfd, int32 fileid, HDFSP::File **h4filepptr) |
| bool | read_das_special_eos2 (DAS &das, const string &filename, int32 sdid, int32 fileid, bool ecs_metadata, HDFSP::File **h4filepptr) |
| bool | read_das_special_eos2_core (DAS &das, HDFSP::File *spf, const string &filename, bool ecs_metadata) |
| void | read_dds (DDS &dds, const string &filename) |
| bool | read_dds_hdfhybrid (DDS &dds, const string &filename, int32 sdfd, int32 fileid, HDFSP::File *h4file) |
| bool | read_dds_hdfsp (DDS &dds, const string &filename, int32 sdfd, int32 fileid, HDFSP::File *h4file) |
| bool | read_dds_special_1d_grid (DDS &dds, HDFSP::File *spf, const string &filename, int32 sdfd, int32 fileid) |
| void | read_dds_spfields (DDS &dds, const string &filename, const int sdfd, HDFSP::SDField *spsds, SPType sptype) |
| void | read_dds_spvdfields (DDS &dds, const string &filename, const int fileid, int32 vdref, int32 numrec, HDFSP::VDField *spvd) |
DAP attributes and structure description generation code.
Definition in file hdfdesc.cc.
| #define ATTR_STRING_QUOTE_FIX |
Definition at line 155 of file hdfdesc.cc.
| #define HANDLE_CASE | ( | tid, | |
| type | |||
| ) |
Referenced by read_dds_special_1d_grid(), read_dds_spfields(), and read_dds_spvdfields().
| #define HANDLE_CASE | ( | tid, | |
| type | |||
| ) |
| #define HANDLE_CASE | ( | tid, | |
| type | |||
| ) |
| #define SIGNED_BYTE_TO_INT32 1 |
Definition at line 105 of file hdfdesc.cc.
| void AddHDFAttr | ( | DAS & | das, |
| const string & | varname, | ||
| const vector< hdf_attr > & | hav | ||
| ) |
Definition at line 4279 of file hdfdesc.cc.
References DAPTypeName(), hdfeos_delete_buffer(), hdfeos_string(), hdfeosparse(), BESLog::TheLog(), and THROW.

| void AddHDFAttr | ( | DAS & | das, |
| const string & | varname, | ||
| const vector< string > & | anv | ||
| ) |
Definition at line 4373 of file hdfdesc.cc.
References THROW.
| void change_das_mod08_scale_offset | ( | DAS & | das, |
| HDFSP::File * | spf | ||
| ) |
Definition at line 2995 of file hdfdesc.cc.
References HDFSP::SD::getFields(), HDFSP::File::getSD(), HDFCFUtil::print_attr(), and HDFCFUtil::print_type().

| int check_special_eosfile | ( | const string & | filename, |
| string & | grid_name, | ||
| int32 | sdfd, | ||
| int32 | fileid | ||
| ) |
Definition at line 3628 of file hdfdesc.cc.
References basename().

| void hdfeos_delete_buffer | ( | void * | buffer | ) |
Definition at line 2045 of file lex.hdfeos.cc.
References hdfeos_delete_buffer().
Referenced by AddHDFAttr(), read_das_hdfsp(), and read_das_special_eos2_core().

| yy_buffer_state* hdfeos_scan_string | ( | const char * | str | ) |
| void* hdfeos_string | ( | const char * | yy_str | ) |
Definition at line 2033 of file lex.hdfeos.cc.
References hdfeos_scan_string().
Referenced by AddHDFAttr(), read_das_hdfsp(), and read_das_special_eos2_core().

| void hdfeos_switch_to_buffer | ( | void * | new_buffer | ) |
Definition at line 2039 of file lex.hdfeos.cc.
References hdfeos_switch_to_buffer().

| int hdfeosparse | ( | libdap::parser_arg * | arg | ) |
Referenced by AddHDFAttr(), read_das_hdfsp(), and read_das_special_eos2_core().
| string num2string | ( | T | n | ) |
Definition at line 157 of file hdfdesc.cc.
| void read_das | ( | DAS & | das, |
| const string & | filename | ||
| ) |
Definition at line 3913 of file hdfdesc.cc.
References basename(), NULL, and THROW.
Referenced by HDF4RequestHandler::hdf4_build_das(), HDF4RequestHandler::hdf4_build_data(), and HDF4RequestHandler::hdf4_build_dds().

| bool read_das_hdfhybrid | ( | DAS & | das, |
| const string & | filename, | ||
| int32 | sdfd, | ||
| int32 | fileid, | ||
| HDFSP::File ** | h4filepptr | ||
| ) |
| bool read_das_hdfsp | ( | DAS & | das, |
| const string & | filename, | ||
| int32 | sdfd, | ||
| int32 | fileid, | ||
| HDFSP::File ** | h4filepptr | ||
| ) |
Definition at line 2251 of file hdfdesc.cc.
References HDFCFUtil::add_missing_cf_attrs(), HDFCFUtil::add_obpg_special_attrs(), BESDEBUG, CER_AVG, CER_ES4, CER_SRB, CER_ZAVG, HDFCFUtil::check_beskeys(), HDFCFUtil::check_obpg_global_attrs(), HDFCFUtil::correct_fvalue_type(), HDFCFUtil::correct_scale_offset_type(), HDFCFUtil::escattr(), HDFSP::SD::getAttributes(), HDFSP::SD::getFields(), HDFSP::File::getSD(), HDFSP::File::getSPType(), HDFSP::File::getVgattrs(), HDFCFUtil::handle_merra_ceres_attrs_with_bes_keys(), HDFCFUtil::handle_otherhdf_special_attrs(), HDFCFUtil::handle_vdata_attrs_with_desc_key(), HDFSP::File::Has_Dim_NoScale_Field(), hdfeos_delete_buffer(), hdfeos_string(), hdfeosparse(), NULL, OTHERHDF, HDFSP::File::Prepare(), HDFCFUtil::print_attr(), HDFCFUtil::print_type(), HDFSP::File::Read(), BESLog::TheLog(), TRMML2_V6, TRMML2_V7, TRMML3M_V7, TRMML3S_V7, and HDFSP::Exception::what().
Referenced by HDF4RequestHandler::hdf4_build_das(), HDF4RequestHandler::hdf4_build_data(), HDF4RequestHandler::hdf4_build_data_with_IDs(), and HDF4RequestHandler::hdf4_build_dds().

| bool read_das_special_eos2 | ( | DAS & | das, |
| const string & | filename, | ||
| int32 | sdid, | ||
| int32 | fileid, | ||
| bool | ecs_metadata, | ||
| HDFSP::File ** | h4filepptr | ||
| ) |
Definition at line 2755 of file hdfdesc.cc.
References BESDEBUG, NULL, HDFSP::File::Prepare(), HDFSP::File::Read(), read_das_special_eos2_core(), and HDFSP::Exception::what().

| bool read_das_special_eos2_core | ( | DAS & | das, |
| HDFSP::File * | spf, | ||
| const string & | filename, | ||
| bool | ecs_metadata | ||
| ) |
Definition at line 2806 of file hdfdesc.cc.
References BESDEBUG, HDFCFUtil::escattr(), HDFSP::SD::getAttributes(), HDFSP::SD::getFields(), HDFSP::File::getSD(), hdfeos_delete_buffer(), hdfeos_string(), hdfeosparse(), HDFCFUtil::print_attr(), HDFCFUtil::print_type(), and BESLog::TheLog().
Referenced by read_das_special_eos2().

| void read_dds | ( | DDS & | dds, |
| const string & | filename | ||
| ) |
Definition at line 3900 of file hdfdesc.cc.
References basename(), and THROW.
Referenced by HDF4RequestHandler::hdf4_build_data(), and HDF4RequestHandler::hdf4_build_dds().

| bool read_dds_hdfhybrid | ( | DDS & | dds, |
| const string & | filename, | ||
| int32 | sdfd, | ||
| int32 | fileid, | ||
| HDFSP::File * | h4file | ||
| ) |
| bool read_dds_hdfsp | ( | DDS & | dds, |
| const string & | filename, | ||
| int32 | sdfd, | ||
| int32 | fileid, | ||
| HDFSP::File * | h4file | ||
| ) |
Definition at line 2158 of file hdfdesc.cc.
References basename(), BESDEBUG, CER_AVG, CER_ES4, CER_SRB, CER_ZAVG, HDFCFUtil::check_beskeys(), HDFSP::SD::getFields(), HDFSP::File::getSD(), HDFSP::File::getSPType(), HDFSP::File::getVDATAs(), HDFSP::File::Has_Dim_NoScale_Field(), HDFSP::File::Prepare(), HDFSP::File::Read(), read_dds_spfields(), read_dds_spvdfields(), and HDFSP::Exception::what().
Referenced by HDF4RequestHandler::hdf4_build_data(), HDF4RequestHandler::hdf4_build_data_with_IDs(), and HDF4RequestHandler::hdf4_build_dds().

| bool read_dds_special_1d_grid | ( | DDS & | dds, |
| HDFSP::File * | spf, | ||
| const string & | filename, | ||
| int32 | sdfd, | ||
| int32 | fileid | ||
| ) |
Definition at line 3074 of file hdfdesc.cc.
References BESDEBUG, HDFSP::SD::getFields(), HDFSP::File::getSD(), HANDLE_CASE, NULL, and OTHERHDF.

| void read_dds_spfields | ( | DDS & | dds, |
| const string & | filename, | ||
| const int | sdfd, | ||
| HDFSP::SDField * | spsds, | ||
| SPType | sptype | ||
| ) |
Definition at line 3237 of file hdfdesc.cc.
References BESDEBUG, HDFSP::SDField::getCorrectedDimensions(), HDFSP::SDField::getDimensions(), HDFSP::SDField::getFieldRef(), HDFSP::SDField::getFieldType(), HDFSP::Field::getName(), HDFSP::Field::getNewName(), HDFSP::Field::getRank(), HDFSP::Field::getType(), HANDLE_CASE, HDFSP::SDField::IsDimNoScale(), MODISARNSS, NULL, OTHERHDF, and TRMML2_V7.
Referenced by read_dds_hdfsp().

| void read_dds_spvdfields | ( | DDS & | dds, |
| const string & | filename, | ||
| const int | fileid, | ||
| int32 | vdref, | ||
| int32 | numrec, | ||
| HDFSP::VDField * | spvd | ||
| ) |
Definition at line 3497 of file hdfdesc.cc.
References BESDEBUG, HDFSP::VDField::getFieldOrder(), HDFSP::Field::getName(), HDFSP::Field::getNewName(), HDFSP::Field::getType(), HANDLE_CASE, and NULL.
Referenced by read_dds_hdfsp().
