|
Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef GroundGrid_h 00002 #define GroundGrid_h 00003 00025 namespace Isis { 00026 class Angle; 00027 class Latitude; 00028 class Longitude; 00029 class PvlGroup; 00030 class Progress; 00031 class UniversalGroundMap; 00032 00059 class GroundGrid { 00060 public: 00061 GroundGrid(UniversalGroundMap *gmap, bool splitLatLon, 00062 unsigned int width, unsigned int height); 00063 00064 virtual ~GroundGrid(); 00065 00066 void CreateGrid(Latitude baseLat, Longitude baseLon, 00067 Angle latInc, Angle lonInc, 00068 Progress *progress = 0); 00069 00070 void CreateGrid(Latitude baseLat, Longitude baseLon, 00071 Angle latInc, Angle lonInc, 00072 Progress *progress, 00073 Angle latRes, Angle lonRes); 00074 00075 void WalkBoundary(); 00076 00077 void SetGroundLimits(Latitude minLat, Longitude minLon, Latitude maxLat, 00078 Longitude maxLon); 00079 00080 bool PixelOnGrid(int x, int y); 00081 bool PixelOnGrid(int x, int y, bool latGrid); 00082 00089 PvlGroup *GetMappingGroup() { return p_mapping; } 00090 00091 protected: 00092 virtual bool GetXY(Latitude lat, Longitude lon, 00093 unsigned int &x, unsigned int &y); 00094 00096 UniversalGroundMap *GroundMap() { 00097 return p_groundMap; 00098 } 00099 00100 private: 00101 void SetGridBit(unsigned int x, unsigned int y, bool latGrid); 00102 bool GetGridBit(unsigned int x, unsigned int y, bool latGrid); 00103 void DrawLineOnGrid(unsigned int x1, unsigned int y1, 00104 unsigned int x2, unsigned int y2, 00105 bool isLatLine); 00106 00107 00108 char *p_grid; 00109 char *p_latLinesGrid; 00110 char *p_lonLinesGrid; 00111 unsigned int p_width; 00112 unsigned int p_height; 00113 unsigned long p_gridSize; 00114 UniversalGroundMap *p_groundMap; 00115 00116 Latitude *p_minLat; 00117 Longitude *p_minLon; 00118 Latitude *p_maxLat; 00119 Longitude *p_maxLon; 00120 00122 PvlGroup *p_mapping; 00123 00124 double p_defaultResolution; 00125 00126 bool p_reinitialize; 00127 }; 00128 00129 } 00130 00131 00132 #endif