45HE5Checker::check_grids_missing_projcode(
const HE5Parser* p)
const
48 for (
const auto &g:p->grid_list) {
49 if (HE5_GCTP_MISSING == g.projection) {
58HE5Checker::check_grids_unknown_parameters(
const HE5Parser* p)
const
61 for (
const auto &g:p->grid_list) {
62 if (HE5_GCTP_UNKNOWN == g.projection ||
63 HE5_HDFE_UNKNOWN == g.pixelregistration ||
64 HE5_HDFE_GD_UNKNOWN == g.gridorigin) {
73HE5Checker::set_grids_missing_pixreg_orig(
HE5Parser* p)
const
75 BESDEBUG(
"h5",
"HE5Checker::set_missing_values(Grid Size="
76 << p->grid_list.size() <<
")" << endl);
77 for(
auto &g: p->grid_list) {
81 for(j=0; j < g.dim_list.size(); j++) {
82 HE5Dim d = g.dim_list.at(j);
83 cout <<
"Grid Dim Name=" << d.name;
84 cout <<
" Size=" << d.size << endl;
86 for(j=0; j < g.data_var_list.size(); j++) {
87 HE5Var v = g.data_var_list.at(j);
89 for(k=0; k < v.dim_list.size(); k++) {
90 HE5Dim d = v.dim_list.at(k);
91 cout <<
"Grid Var Dim Name=" << d.name << endl;
94 if(g.projection == -1){
96 "h5",
"Grid projection is not set or the projection code is wrong. Name=" << g.name
101 if (HE5_HDFE_MISSING == g.pixelregistration)
102 g.pixelregistration = HE5_HDFE_CENTER;
104 if (HE5_HDFE_GD_MISSING == g.gridorigin)
105 g.gridorigin = HE5_HDFE_GD_UL;
111HE5Checker::check_grids_multi_latlon_coord_vars(
HE5Parser* p)
const
115 if (1 == p->grid_list.size() ||
116 p->grid_list.empty() )
return false;
119 typedef map<string, int> Dimmap;
125 for (
const auto &g:p->grid_list) {
126 for (
const auto &d:g.dim_list) {
127 Dimmap::iterator iter = dim_map.find(d.name);
128 if(iter != dim_map.end()){
129 if(d.size != iter->second){
135 dim_map[d.name] = d.size;
138 if (
true == flag)
break;
147 HE5Grid g = p->grid_list.at(0);
148 EOS5GridPCType projcode = g.projection;
149 EOS5GridPRType pixelreg = g.pixelregistration;
150 EOS5GridOriginType pixelorig = g.gridorigin;
157 for(
unsigned int i=1; i < p->grid_list.size(); i++) {
158 g = p->grid_list.at(i);
159 if (projcode != g.projection ||
160 pixelreg != g.pixelregistration ||
161 pixelorig!= g.gridorigin ||
175bool HE5Checker::check_grids_support_projcode(
const HE5Parser*p)
const{
178 for (
const auto &g:p->grid_list) {
179 if (g.projection != HE5_GCTP_GEO && g.projection != HE5_GCTP_SNSOID
180 && g.projection != HE5_GCTP_LAMAZ && g.projection != HE5_GCTP_PS) {
A class for parsing NASA HDF-EOS5 StructMetadata.
double point_right
The rightmost coordinate value of a Grid.
double point_upper
The top coordinate value of a Grid.
double point_left
The leftmost coordinate value of a Grid.
double point_lower
The bottom coordinate value of a Grid.