Isis Developer Reference
Isis::UniversalGroundMap Class Reference

Universal Ground Map. More...

#include <UniversalGroundMap.h>

Collaboration diagram for Isis::UniversalGroundMap:
Collaboration graph

Public Types

enum  CameraPriority { CameraFirst, ProjectionFirst }
 This enum is used to define whether to use a camera or projection primarily, and which to fall back on. More...
 

Public Member Functions

 UniversalGroundMap (Cube &cube, CameraPriority priority=CameraFirst)
 Constructs a UniversalGroundMap object from a cube. More...
 
 ~UniversalGroundMap ()
 Destroys the UniversalGroundMap object. More...
 
void SetBand (const int band)
 Set the image band number. More...
 
bool SetUniversalGround (double lat, double lon)
 Returns whether the lat/lon position was set successfully in the camera model or projection. More...
 
bool SetUnboundGround (Latitude lat, Longitude lon)
 Returns whether the lat/lon position was set successfully in the camera model or projection. More...
 
bool SetGround (Latitude lat, Longitude lon)
 Returns whether the lat/lon position was set successfully in the camera model or projection. More...
 
bool SetGround (const SurfacePoint &)
 Returns whether the SurfacePoint was set successfully in the camera model or projection. More...
 
double Sample () const
 Returns the current line value of the camera model or projection. More...
 
double Line () const
 Returns the current line value of the camera model or projection. More...
 
bool SetImage (double sample, double line)
 Returns whether the sample/line postion was set successfully in the camera model or projection. More...
 
double UniversalLatitude () const
 Returns the universal latitude of the camera model or projection. More...
 
double UniversalLongitude () const
 Returns the universal longitude of the camera model or projection. More...
 
double Resolution () const
 Returns the resolution of the camera model or projection. More...
 
bool GroundRange (Cube *cube, Latitude &minLat, Latitude &maxLat, Longitude &minLon, Longitude &maxLon, bool allowEstimation=true)
 Find the lat/lon range of the image. More...
 
bool HasProjection ()
 Returns whether the ground map has a projection or not. More...
 
bool HasCamera ()
 Returns whether the ground map has a camera or not. More...
 
Isis::ProjectionProjection () const
 Return the projection associated with the ground map (NULL implies none) More...
 
Isis::CameraCamera () const
 Return the camera associated with the ground map (NULL implies none) More...
 

Detailed Description

Universal Ground Map.

???

Author
2005-08-09 Jeff Anderson

Member Enumeration Documentation

◆ CameraPriority

This enum is used to define whether to use a camera or projection primarily, and which to fall back on.

Enumerator
CameraFirst 

This is the default because cameras are projection-aware.

Use the camera for additional power if available, and fall back to projection

ProjectionFirst 

Use the projection for functionality well outside the original image if available, and fall back to camera.

Constructor & Destructor Documentation

◆ UniversalGroundMap()

Isis::UniversalGroundMap::UniversalGroundMap ( Cube cube,
CameraPriority  priority = CameraFirst 
)

Constructs a UniversalGroundMap object from a cube.

Parameters
cubeThe Cube to create the UniversalGroundMap from
priorityTry to make a camera or projection first

References _FILEINFO_, Isis::IException::append(), CameraFirst, Isis::CameraFactory::Create(), Isis::ProjectionFactory::CreateFromCube(), Isis::Cube::fileName(), Isis::Cube::label(), and Isis::IException::Unknown.

◆ ~UniversalGroundMap()

Isis::UniversalGroundMap::~UniversalGroundMap ( )

Destroys the UniversalGroundMap object.

Member Function Documentation

◆ Camera()

Isis::Camera* Isis::UniversalGroundMap::Camera ( ) const
inline

Return the camera associated with the ground map (NULL implies none)

Referenced by Isis::ImagePolygon::Create(), Isis::CubeViewport::CubeViewport(), and Isis::ImagePolygon::initCube().

◆ GroundRange()

bool Isis::UniversalGroundMap::GroundRange ( Cube cube,
Latitude minLat,
Latitude maxLat,
Longitude minLon,
Longitude maxLon,
bool  allowEstimation = true 
)

Find the lat/lon range of the image.

This will use the image footprint, camera, or projection in order to find a good result.

Parameters
Cube*This is required for estimation. You can pass in NULL (it will disable estimation).
minLatThis is an output: minimum latitude
maxLatThis is an output: maximum latitude
minLonThis is an output: minimum longitude
maxLonThis is an output: maximum longitude
allowEstimationIf this is true then extra efforts will be made to guess the ground range of the input. This can still fail.
Returns
True if a ground range was found, false if no ground range could be determined. Some lat/lon results may still be populated; their values are undefined.

References Isis::Angle::Degrees, Isis::Camera::GroundRange(), HasCamera(), Isis::PvlContainer::hasKeyword(), HasProjection(), Isis::Angle::isValid(), Isis::Cube::lineCount(), Isis::PolygonTools::MakeMultiPolygon(), Isis::Projection::Mapping(), Isis::ShapeModel::name(), Isis::ImagePolygon::Polys(), Isis::Projection::projectionType(), Isis::Cube::readFootprint(), Isis::Projection::RingPlane, Isis::Cube::sampleCount(), Isis::Projection::SetWorld(), Isis::Target::shape(), Isis::Spice::target(), Isis::TProjection::UniversalLatitude(), and Isis::TProjection::UniversalLongitude().

◆ HasCamera()

bool Isis::UniversalGroundMap::HasCamera ( )
inline

Returns whether the ground map has a camera or not.

Returns
bool Returns true if the ground map has a camera, and false if it does not

Referenced by GroundRange(), and Isis::InterestOperator::Operate().

◆ HasProjection()

bool Isis::UniversalGroundMap::HasProjection ( )
inline

Returns whether the ground map has a projection or not.

Returns
bool Returns true if the ground map has a projection, and false if it does not

Referenced by GroundRange().

◆ Line()

double Isis::UniversalGroundMap::Line ( ) const

Returns the current line value of the camera model or projection.

Returns
Line value

References Isis::Camera::Line(), and Isis::Projection::WorldY().

Referenced by Isis::StereoTool::createPoint(), Isis::PolygonTools::LatLonToSampleLine(), Isis::FindTool::paintViewport(), and Isis::FindTool::updateTool().

◆ Projection()

Isis::Projection* Isis::UniversalGroundMap::Projection ( ) const
inline

Return the projection associated with the ground map (NULL implies none)

Referenced by Isis::CubeViewport::CubeViewport().

◆ Resolution()

double Isis::UniversalGroundMap::Resolution ( ) const

Returns the resolution of the camera model or projection.

Returns
Resolution

References Isis::Camera::PixelResolution(), and Isis::Projection::Resolution().

◆ Sample()

double Isis::UniversalGroundMap::Sample ( ) const

Returns the current line value of the camera model or projection.

Returns
Sample value

References Isis::Camera::Sample(), and Isis::Projection::WorldX().

Referenced by Isis::StereoTool::createPoint(), Isis::PolygonTools::LatLonToSampleLine(), Isis::FindTool::paintViewport(), and Isis::FindTool::updateTool().

◆ SetBand()

void Isis::UniversalGroundMap::SetBand ( const int  band)

Set the image band number.

Parameters
[in]band(int) Image band number

References Isis::Camera::SetBand().

Referenced by Isis::ImagePolygon::initCube().

◆ SetGround() [1/2]

bool Isis::UniversalGroundMap::SetGround ( const SurfacePoint sp)

Returns whether the SurfacePoint was set successfully in the camera model or projection.

Parameters
spThe Surface Point to set ground with
Returns
Returns true if the Surface Point was set successfully, and false otherwise

References Isis::Angle::degrees(), Isis::SurfacePoint::GetLatitude(), Isis::SurfacePoint::GetLongitude(), Isis::Camera::InCube(), Isis::Camera::SetGround(), and Isis::Projection::SetUniversalGround().

◆ SetGround() [2/2]

bool Isis::UniversalGroundMap::SetGround ( Latitude  lat,
Longitude  lon 
)

Returns whether the lat/lon position was set successfully in the camera model or projection.

Parameters
latThe universal latitude or ring radius for ring planes
lonThe universal longitude or ring longitude (azimuth) for ring planes
Returns
Returns true if the lat/lon position was set successfully, and false if it was not

References Isis::Angle::degrees(), Isis::Camera::InCube(), Isis::Camera::SetGround(), and Isis::Projection::SetUniversalGround().

◆ SetImage()

bool Isis::UniversalGroundMap::SetImage ( double  sample,
double  line 
)

Returns whether the sample/line postion was set successfully in the camera model or projection.

Parameters
sampleThe sample position
lineThe line position
Returns
Returns true if the sample/line position was set successfully, and false if it was not

References Isis::Camera::SetImage(), and Isis::Projection::SetWorld().

Referenced by Isis::ControlNetTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::InterestOperator::Operate(), Isis::StereoTool::rubberBandComplete(), and Isis::FindTool::updateTool().

◆ SetUnboundGround()

bool Isis::UniversalGroundMap::SetUnboundGround ( Latitude  lat,
Longitude  lon 
)

Returns whether the lat/lon position was set successfully in the camera model or projection.

This will not adjust the longitude based on the longitude domain.

Parameters
latThe universal latitude or ring radius for ring planes
lonThe universal longitude or ring longitude (azimuth) for ring planes
Returns
Returns true if the lat/lon position was set successfully, and false if it was not

References Isis::Angle::degrees(), Isis::Camera::InCube(), Isis::Camera::SetGround(), and Isis::Projection::SetUnboundUniversalGround().

◆ SetUniversalGround()

bool Isis::UniversalGroundMap::SetUniversalGround ( double  lat,
double  lon 
)

Returns whether the lat/lon position was set successfully in the camera model or projection.

Parameters
latThe universal latitude or ring radius for ring planes
lonThe universal longitude or ring longitude (azimuth) for ring planes
Returns
Returns true if the lat/lon position was set successfully, and false if it was not

References Isis::Camera::InCube(), Isis::Projection::SetUniversalGround(), and Isis::Camera::SetUniversalGround().

Referenced by Isis::StereoTool::createPoint(), Isis::PolygonTools::LatLonToSampleLine(), Isis::FindTool::paintViewport(), and Isis::FindTool::updateTool().

◆ UniversalLatitude()

◆ UniversalLongitude()


The documentation for this class was generated from the following files: