/*************************************************************************** * Copyright (C) 2005 by Nicolas PASCAL * * nicolas.pascal@icare.univ-lille1.fr * * * * 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 "satellitefiledata.h" void SatelliteFileData::free_geolocation_data() { delete[] lat_data, lat_data = NULL; delete[] lon_data, lon_data = NULL; delete[] time_data, time_data = NULL; } // void SatelliteFileData::free_viewing_directions() { // viewing_directions.clear(); // } void SatelliteFileData::free_v_pixel() { v_pixel.clear(); } const bool SatelliteFileData::is_geolocation_data_loaded() const { return (lat_data!=NULL && lon_data!=NULL && time_data!=NULL); } SatelliteFileData::~SatelliteFileData() { free_geolocation_data(); free_v_pixel(); free_viewing_directions_data(); free_pix2data_map(); } // void SatelliteFileData::print_viewing_directions() { // typedef vector PixelIndice; // for (std::map ::iterator it = viewing_directions.begin() ; it != viewing_directions.end() ; ++it) // cout << MyTools::vec2str (it->first) << " : " << it->second << endl; // } void SatelliteFileData::free_pix2data_map() { ipix2idata.clear(); } void SatelliteFileData::print_pix2data_map() { typedef vector PixelIndice; typedef vector DataIndice; for (std::map ::iterator it = ipix2idata.begin() ; it != ipix2idata.end() ; ++it) cout << MyTools::vec2str(it->first) << " : " << MyTools::vec2str(it->second) << endl; }