We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code:
#include <iostream> #include <libdap/Connect.h> #include <libdap/Array.h> #include <libdap/Grid.h> using namespace libdap; int main() { Connect cn("http://tds.hycom.org/thredds/dodsC/GLBv0.08/expt_53.X/data/2008"); BaseTypeFactory btf; DataDDS data(&btf); cn.request_data(data,"surf_el[145:146]"); data.print(std::cout); auto* elb=data.var("surf_el"); if(elb==nullptr) return 1; std::cout<<elb->type_name()<<" "<<elb->length()<<std::endl; auto* el=dynamic_cast<Grid*>(elb); auto* arr=el->get_array(); std::cout<<arr->type_name()<<" "<<arr->length()<<std::endl; std::cout<<el->components()<<std::endl; for(size_t i=0; i<el->components()-1; ++i) { auto map=*(el->get_map_iter(i)); std::cout<<map->type_name()<<" "<<map->length()<<std::endl; } return 0; }
Output:
Dataset { Grid { Array: Int16 surf_el[time = 2][lat = 3251][lon = 4500]; Maps: Float64 time[time = 2]; Float64 lat[lat = 3251]; Float64 lon[lon = 4500]; } surf_el; } GLBv0.08/expt_53.X/data/2008; Grid 1 Array 29259000 4 Array 3251 Array 4500 Segmentation fault
get_map_iter() skips map "time" and cause segmentation fault then called last time.
libdap 3.20.7.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Fixed
No branches or pull requests
Example code:
Output:
get_map_iter() skips map "time" and cause segmentation fault then called last time.
libdap 3.20.7.
The text was updated successfully, but these errors were encountered: