Isis 3.0 Programmer Reference
Back | Home
GroundGrid.h
Go to the documentation of this file.
1 #ifndef GroundGrid_h
2 #define GroundGrid_h
3 
25 namespace Isis {
26  class Angle;
27  class Latitude;
28  class Longitude;
29  class PvlGroup;
30  class Progress;
31  class UniversalGroundMap;
32 
69  class GroundGrid {
70  public:
72  bool splitLatLon,
73  unsigned int width,
74  unsigned int height);
75 
76  virtual ~GroundGrid();
77 
78  void CreateGrid(Latitude baseLat,
79  Longitude baseLon,
80  Angle latInc,
81  Angle lonInc,
82  Progress *progress = 0);
83 
84  void CreateGrid(Latitude baseLat,
85  Longitude baseLon,
86  Angle latInc,
87  Angle lonInc,
88  Progress *progress,
89  Angle latRes,
90  Angle lonRes);
91 
92  void WalkBoundary();
93 
94  void SetGroundLimits(Latitude minLat,
95  Longitude minLon,
96  Latitude maxLat,
97  Longitude maxLon);
98 
99  bool PixelOnGrid(int x, int y);
100  bool PixelOnGrid(int x, int y, bool latGrid);
101 
103 
104  protected:
105  virtual bool GetXY(Latitude lat, Longitude lon,
106  unsigned int &x, unsigned int &y);
107 
109 
110  private:
111  void SetGridBit(unsigned int x, unsigned int y, bool latGrid);
112  bool GetGridBit(unsigned int x, unsigned int y, bool latGrid);
113  void DrawLineOnGrid(unsigned int x1, unsigned int y1,
114  unsigned int x2, unsigned int y2,
115  bool isLatLine);
116 
117 
118  char *p_grid;
121  unsigned int p_width;
122  unsigned int p_height;
123  unsigned long p_gridSize;
125 
130 
133 
135 
137  };
138 
139 }
140 
141 
142 #endif
Universal Ground Map.
PvlGroup * GetMappingGroup()
Returns a mapping group representation of the projection or camera.
Definition: GroundGrid.cpp:520
double p_defaultResolution
Default step size in degrees/pixel.
Definition: GroundGrid.h:134
bool p_reinitialize
True if we need to reset p_grid in CreateGrid.
Definition: GroundGrid.h:136
Latitude * p_maxLat
Highest latitude in image.
Definition: GroundGrid.h:128
void CreateGrid(Latitude baseLat, Longitude baseLon, Angle latInc, Angle lonInc, Progress *progress=0)
This method draws the grid internally, using default resolutions.
Definition: GroundGrid.cpp:208
Latitude * p_minLat
Lowest latitude in image.
Definition: GroundGrid.h:126
unsigned long p_gridSize
This is width*height.
Definition: GroundGrid.h:123
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
UniversalGroundMap * GroundMap()
Returns the ground map for children.
Definition: GroundGrid.cpp:555
unsigned int p_width
This is the width of the grid.
Definition: GroundGrid.h:121
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
Calculates a lat/lon grid over an area.
Definition: GroundGrid.h:69
char * p_lonLinesGrid
This stores the bits of each pixel in the grid.
Definition: GroundGrid.h:120
Program progress reporter.
Definition: Progress.h:58
unsigned int p_height
This is the height of the grid.
Definition: GroundGrid.h:122
PvlGroup * p_mapping
The mapping group representation of the projection or camera.
Definition: GroundGrid.h:132
GroundGrid(UniversalGroundMap *gmap, bool splitLatLon, unsigned int width, unsigned int height)
This method initializes the class by allocating the grid, calculating the lat/lon range...
Definition: GroundGrid.cpp:32
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
void SetGridBit(unsigned int x, unsigned int y, bool latGrid)
This flags a bit as on the grid lines.
Definition: GroundGrid.cpp:567
void DrawLineOnGrid(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, bool isLatLine)
This sets the bits on the grid along the specified line.
Definition: GroundGrid.cpp:642
Longitude * p_maxLon
Highest longitude in image.
Definition: GroundGrid.h:129
UniversalGroundMap * p_groundMap
This calculates single grid pts.
Definition: GroundGrid.h:124
char * p_grid
This stores the bits of each pixel in the grid.
Definition: GroundGrid.h:118
Longitude * p_minLon
Lowest longitude in image.
Definition: GroundGrid.h:127
Defines an angle and provides unit conversions.
Definition: Angle.h:58
virtual ~GroundGrid()
Delete the object.
Definition: GroundGrid.cpp:157
bool GetGridBit(unsigned int x, unsigned int y, bool latGrid)
Returns true if the specified coordinate is on the grid lines.
Definition: GroundGrid.cpp:603
char * p_latLinesGrid
This stores the bits of each pixel in the grid.
Definition: GroundGrid.h:119
void WalkBoundary()
This draws grid lines along the extremes of the lat/lon box of the grid.
Definition: GroundGrid.cpp:416
bool PixelOnGrid(int x, int y)
Returns true if the grid is on this point.
Definition: GroundGrid.cpp:503
virtual bool GetXY(Latitude lat, Longitude lon, unsigned int &x, unsigned int &y)
This method converts a lat/lon to an X/Y.
Definition: GroundGrid.cpp:535
void SetGroundLimits(Latitude minLat, Longitude minLon, Latitude maxLat, Longitude maxLon)
This restricts (or grows) the ground range in which to draw grid lines.
Definition: GroundGrid.cpp:393

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:18:51