![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 #ifndef dted_geoid_grid_H_ 00002 #define dted_geoid_grid_H_ 00003 00004 #include "dted/dtedDefines.h" 00005 00006 #include <string> 00007 #include <vector> 00008 00009 class DT_DLL_dted Dt_geoid_grid 00010 { 00011 public: 00012 // data type we're storing 00013 typedef double value_type; 00014 // index into array of value_types 00015 typedef unsigned int index_type; 00016 00017 Dt_geoid_grid(); 00018 Dt_geoid_grid(std::string const & filename); 00019 00020 bool load(std::string const & filename); 00021 void unload(); 00022 bool loaded() const; 00023 00024 bool load_ascii_grid(std::string const & filename); 00025 00026 value_type value_at_index(index_type ilat, index_type ilon) const; 00027 value_type get_value(value_type lat, value_type lon) const; 00028 00029 std::string print_values(value_type lat, value_type lon) const; 00030 00031 index_type lat_index(value_type lat) const; 00032 index_type lon_index(value_type lon) const; 00033 00034 private: 00035 value_type minlat_, maxlat_, minlon_, maxlon_; 00036 value_type latspacing_, lonspacing_; 00037 index_type latbands_, lonbands_; 00038 std::vector<value_type> data_; 00039 }; 00040 00041 #endif