/*************************************************************************** * Copyright (C) 2006 by Nicolas PASCAL * * pascal@icare-pc12 * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "merisfiledata.h" #include "filedatareader.h" int main(int argc, char *argv[]) { /********** TEST DIRECTORIES FUNCTIONS **********/ string filename = "/home/manley/MER_RR__1PNPDK20030813_094018_000022742019_00022_07591_4499.N1"; string mode ="r"; float32 f; string attr; FileDataReader *read= new MerisFileData(filename,mode); read->open_data_file(); attr=read->get_values_attr("PRODUCT"); cout<get_values_attr("ECMWF_TYPE"); cout<get_values_attr("NUM_SLICES"); cout<get_n_dataset(); for(int i= 0; iget_dataset_fill_value(read->get_dataset_name(i),(void*)&f); if(read->has_attr_dataset(read->get_dataset_name(i),"dsr_time")){ attr=read->get_values_attr_dataset(read->get_dataset_name(i),"dsr_time"); cout<close_data_file(); delete read; return(1); };