![]() |
Isis 3 Developer Reference
|
Calculates a lat/lon grid over an area. More...
#include <GroundGrid.h>

Public Member Functions | |
| GroundGrid (UniversalGroundMap *gmap, bool splitLatLon, bool extendGrid, unsigned int width, unsigned int height) | |
| This method initializes the class by allocating the grid, calculating the lat/lon range, and getting a default grid resolution. More... | |
| virtual | ~GroundGrid () |
| Delete the object. More... | |
| void | CreateGrid (Latitude baseLat, Longitude baseLon, Angle latInc, Angle lonInc, Progress *progress=0) |
| This method draws the grid internally, using default resolutions. More... | |
| void | CreateGrid (Latitude baseLat, Longitude baseLon, Angle latInc, Angle lonInc, Progress *progress, Angle latRes, Angle lonRes) |
| This method draws the grid internally. More... | |
| void | WalkBoundary () |
| This draws grid lines along the extremes of the lat/lon box of the grid. More... | |
| void | SetGroundLimits (Latitude minLat, Longitude minLon, Latitude maxLat, Longitude maxLon) |
| This restricts (or grows) the ground range in which to draw grid lines. More... | |
| bool | PixelOnGrid (int x, int y) |
| Returns true if the grid is on this point. More... | |
| bool | PixelOnGrid (int x, int y, bool latGrid) |
| Returns true if the grid is on this point. More... | |
| Latitude | minLatitude () const |
| Returns the minimum latitude for the grid. More... | |
| Longitude | minLongitude () const |
| Returns the minimum longitude for the grid. More... | |
| Latitude | maxLatitude () const |
| Returns the maximum latitude for the grid. More... | |
| Longitude | maxLongitude () const |
| Returns the maximum longitude for the grid. More... | |
| PvlGroup * | GetMappingGroup () |
| Returns a mapping group representation of the projection or camera. More... | |
Protected Member Functions | |
| virtual bool | GetXY (Latitude lat, Longitude lon, unsigned int &x, unsigned int &y) |
| This method converts a lat/lon to an X/Y. More... | |
| UniversalGroundMap * | GroundMap () |
| Returns the ground map for children. More... | |
Calculates a lat/lon grid over an area.
This class, given a universal ground map, area width and height, base lat/lon, lat/lon increments, and optionalls a progress and resolutions will calculate where grid lines should lie.
| Isis::GroundGrid::GroundGrid | ( | UniversalGroundMap * | gmap, |
| bool | splitLatLon, | ||
| bool | extendGrid, | ||
| unsigned int | width, | ||
| unsigned int | height | ||
| ) |
This method initializes the class by allocating the grid, calculating the lat/lon range, and getting a default grid resolution.
| gmap | A universal ground map to use for calculating the grid |
| splitLatLon | Make two grids: one for latitude lines and one for longitude lines |
| extendGrid | If the grid should extend past the longitude domain boundary. |
| width | The width of the grid; often cube samples |
| height | The height of the grid; often cube samples |
References Isis::PvlObject::findGroup(), Isis::Distance::meters(), and Isis::toDouble().
|
virtual |
Delete the object.
| void Isis::GroundGrid::CreateGrid | ( | Latitude | baseLat, |
| Longitude | baseLon, | ||
| Angle | latInc, | ||
| Angle | lonInc, | ||
| Progress * | progress, | ||
| Angle | latRes, | ||
| Angle | lonRes | ||
| ) |
This method draws the grid internally.
It is not valid to call PixelOnGrid until this method has been called.
| baseLat | Latitude to hit in the grid |
| baseLon | Longitude to hit in the grid |
| latInc | Distance between latitude lines |
| lonInc | Distance between longitude lines |
| progress | If passed in, this progress will be used |
| latRes | Resolution of latitude lines (in degrees/pixel) |
| lonRes | Resolution of longitude lines (in degrees/pixel) |
References _FILEINFO_, Isis::Progress::CheckStatus(), Isis::Angle::isValid(), Isis::Latitude::setErrorChecking(), and Isis::Progress::SetMaximumSteps().
| PvlGroup * Isis::GroundGrid::GetMappingGroup | ( | ) |
Returns a mapping group representation of the projection or camera.
This is useful for matching units with lat/lons.
|
protected |
Returns the ground map for children.
| Latitude Isis::GroundGrid::maxLatitude | ( | ) | const |
| Longitude Isis::GroundGrid::maxLongitude | ( | ) | const |
| Latitude Isis::GroundGrid::minLatitude | ( | ) | const |
| Longitude Isis::GroundGrid::minLongitude | ( | ) | const |
| bool Isis::GroundGrid::PixelOnGrid | ( | int | x, |
| int | y | ||
| ) |
Returns true if the grid is on this point.
| x | X-Coordinate of grid (0-based) |
| y | Y-Coordinate of grid (0-based) |
| bool Isis::GroundGrid::PixelOnGrid | ( | int | x, |
| int | y, | ||
| bool | latGrid | ||
| ) |
Returns true if the grid is on this point.
Using this method is recommended if lat/lon grids are separate.
| x | X-Coordinate of grid (0-based) |
| y | Y-Coordinate of grid (0-based) |
| latGrid | True for latitude lines, false for longitude lines |
| void Isis::GroundGrid::SetGroundLimits | ( | Latitude | minLat, |
| Longitude | minLon, | ||
| Latitude | maxLat, | ||
| Longitude | maxLon | ||
| ) |
This restricts (or grows) the ground range in which to draw grid lines.
| minLat | The lowest latitude extreme to draw grid lines to |
| maxLat | The highest latitude extreme to draw grid lines to |
| minLon | The lowest longitude extreme to draw grid lines to |
| maxLon | The highest longitude extreme to draw grid lines to |
References Isis::Angle::isValid().
| void Isis::GroundGrid::WalkBoundary | ( | ) |
This draws grid lines along the extremes of the lat/lon box of the grid.
References Isis::Latitude::setErrorChecking().