From 475d70cbd311a8717ade067c96e55e7fbac94ca4 Mon Sep 17 00:00:00 2001
From: acpaquette
Date: Wed, 11 Feb 2026 13:46:57 -0700
Subject: [PATCH 1/9] Add check for ugm pointer validity before accessing the
camera
---
isis/src/qisis/objs/FindTool/FindTool.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/isis/src/qisis/objs/FindTool/FindTool.cpp b/isis/src/qisis/objs/FindTool/FindTool.cpp
index e7ae47f10c..126692b70f 100644
--- a/isis/src/qisis/objs/FindTool/FindTool.cpp
+++ b/isis/src/qisis/objs/FindTool/FindTool.cpp
@@ -634,9 +634,11 @@ namespace Isis {
// UniversalGroundMaps default to camera priority, so create a new one so that we can use projection if it exists.
UniversalGroundMap *groundMap = viewport->universalGroundMap();
Distance viewportResolution;
- if (groundMap->Camera() != NULL){
- if (groundMap->Camera()->target()->isSky()) {
- return Distance(groundMap->Camera()->RaDecResolution(), Distance::Units::Meters);
+ if (groundMap) {
+ if (groundMap->Camera() != NULL) {
+ if (groundMap->Camera()->target()->isSky()) {
+ return Distance(groundMap->Camera()->RaDecResolution(), Distance::Units::Meters);
+ }
}
}
From e135efb5cf489ccdc21e2013d291d00a06589c92 Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Mon, 2 Mar 2026 10:19:55 -0700
Subject: [PATCH 2/9] Add the ability to select either the camera or projection
to use in findtool
---
.../UniversalGroundMap/UniversalGroundMap.cpp | 89 ++++++++++++-------
.../UniversalGroundMap/UniversalGroundMap.h | 8 ++
.../qisis/objs/CubeViewport/CubeViewport.cpp | 2 +-
isis/src/qisis/objs/FindTool/FindTool.cpp | 39 ++++++--
isis/src/qisis/objs/FindTool/FindTool.h | 3 +
5 files changed, 102 insertions(+), 39 deletions(-)
diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
index bae21e107d..4a371c1970 100644
--- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
+++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
@@ -33,33 +33,33 @@ namespace Isis {
UniversalGroundMap::UniversalGroundMap(Cube &cube, CameraPriority priority) {
p_camera = NULL;
p_projection = NULL;
+ p_priority = priority;
Pvl &pvl = *cube.label();
try {
- if(priority == CameraFirst)
- p_camera = CameraFactory::Create(cube);
- else
- p_projection = Isis::ProjectionFactory::CreateFromCube(pvl);
+ p_camera = CameraFactory::Create(cube);
}
- catch (IException &firstError) {
+ catch (IException &e) {
+ if (p_priority == CameraFirst) {
+ p_priority = ProjectionFirst;
+ }
p_camera = NULL;
- p_projection = NULL;
+ }
- try {
- if(priority == CameraFirst)
- p_projection = Isis::ProjectionFactory::CreateFromCube(pvl);
- else
- p_camera = CameraFactory::Create(cube);
- }
- catch (IException &secondError) {
- p_projection = NULL;
- QString msg = "Could not create camera or projection for [" +
- cube.fileName() + "]";
- IException realError(IException::Unknown, msg, _FILEINFO_);
- realError.append(firstError);
- realError.append(secondError);
- throw realError;
+ try {
+ p_projection = Isis::ProjectionFactory::CreateFromCube(pvl);
+ }
+ catch (IException &e) {
+ if (p_priority == ProjectionFirst) {
+ p_priority = CameraFirst;
}
+ p_projection = NULL;
+ }
+
+ if (p_camera == NULL && p_projection == NULL) {
+ QString msg = "Could not create camera or projection for [" +
+ cube.fileName() + "]";
+ IException realError(IException::Unknown, msg, _FILEINFO_);
}
}
@@ -100,7 +100,7 @@ namespace Isis {
* false if it was not
*/
bool UniversalGroundMap::SetUniversalGround(double lat, double lon) {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
if (p_camera->SetUniversalGround(lat, lon)) { // This should work for rings (radius,azimuth)
return p_camera->InCube();
}
@@ -125,7 +125,7 @@ namespace Isis {
* false if it was not
*/
bool UniversalGroundMap::SetGround(Latitude lat, Longitude lon) {
- if(p_camera != NULL) {
+ if(p_priority == CameraFirst) {
if(p_camera->SetGround(lat, lon)) { // This should work for rings (radius,azimuth)
return p_camera->InCube();
}
@@ -152,7 +152,7 @@ namespace Isis {
* false if it was not
*/
bool UniversalGroundMap::SetUnboundGround(Latitude lat, Longitude lon) {
- if(p_camera != NULL) {
+ if(p_priority == CameraFirst) {
if(p_camera->SetGround(lat, lon)) { // This should work for rings (radius,azimuth)
return p_camera->InCube();
}
@@ -178,7 +178,7 @@ namespace Isis {
* otherwise
*/
bool UniversalGroundMap::SetGround(const SurfacePoint &sp) {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
if (p_camera->SetGround(sp)) {
return p_camera->InCube();
}
@@ -198,7 +198,7 @@ namespace Isis {
* @return Sample value
*/
double UniversalGroundMap::Sample() const {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
return p_camera->Sample();
}
else {
@@ -212,7 +212,7 @@ namespace Isis {
* @return Line value
*/
double UniversalGroundMap::Line() const {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
return p_camera->Line();
}
else {
@@ -231,7 +231,7 @@ namespace Isis {
* false if it was not
*/
bool UniversalGroundMap::SetImage(double sample, double line) {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
return p_camera->SetImage(sample, line);
}
else {
@@ -245,7 +245,7 @@ namespace Isis {
* @return Universal Latitude
*/
double UniversalGroundMap::UniversalLatitude() const {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
return p_camera->UniversalLatitude();
}
else {
@@ -268,7 +268,7 @@ namespace Isis {
* @return Universal Longitude
*/
double UniversalGroundMap::UniversalLongitude() const {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
return p_camera->UniversalLongitude();
}
else {
@@ -286,13 +286,27 @@ namespace Isis {
}
}
+ /**
+ * Returns the resolution of the camera model or projection
+ *
+ * @return Resolution
+ */
+ double UniversalGroundMap::Radius() const {
+ if (p_priority == CameraFirst) {
+ return p_camera->LocalRadius().meters();
+ }
+ else {
+ return p_projection->LocalRadius();
+ }
+ }
+
/**
* Returns the resolution of the camera model or projection
*
* @return Resolution
*/
double UniversalGroundMap::Resolution() const {
- if (p_camera != NULL) {
+ if (p_priority == CameraFirst) {
return p_camera->PixelResolution();
}
else {
@@ -374,7 +388,7 @@ namespace Isis {
if (!minLat.isValid() || !maxLat.isValid() ||
!minLon.isValid() || !maxLon.isValid()) {
- if (HasCamera()) {
+ if (p_priority == CameraFirst) {
// Footprint failed, ask the camera
PvlGroup mappingGrp("Mapping");
mappingGrp += PvlKeyword("LatitudeType", "Planetocentric");
@@ -395,7 +409,7 @@ namespace Isis {
minLon = Longitude(minLonDouble, Angle::Degrees);
maxLon = Longitude(maxLonDouble, Angle::Degrees);
}
- else if (HasProjection()) {
+ else if (p_priority == ProjectionFirst) {
// Footprint failed, look in the mapping group
PvlGroup mappingGrp = p_projection->Mapping();
if (mappingGrp.hasKeyword("MinimumLatitude") &&
@@ -538,4 +552,15 @@ namespace Isis {
minLon.isValid() && maxLon.isValid() &&
minLat < maxLat && minLon < maxLon);
}
+
+ void UniversalGroundMap::setPriority(int priority) {
+ if (priority == UniversalGroundMap::CameraFirst && HasCamera()) {
+ std::cout << "Setting camera priority" << std::endl;
+ p_priority = (CameraPriority) priority;
+ }
+ else if (priority == UniversalGroundMap::ProjectionFirst && HasProjection()) {
+ std::cout << "Setting projection priority" << std::endl;
+ p_priority = (CameraPriority) priority;
+ }
+ }
}
diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h
index d7d465e587..97ba400768 100644
--- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h
+++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h
@@ -99,6 +99,7 @@ namespace Isis {
bool SetImage(double sample, double line);
double UniversalLatitude() const;
double UniversalLongitude() const;
+ double Radius() const;
double Resolution() const;
bool GroundRange(Cube *cube,
@@ -127,6 +128,12 @@ namespace Isis {
return p_camera != 0;
};
+ int currentPriority() {
+ return p_priority;
+ };
+
+ void setPriority(int priority);
+
//! Return the projection associated with the ground map (NULL implies none)
Isis::Projection *Projection() const {
return p_projection;
@@ -141,6 +148,7 @@ namespace Isis {
private:
Isis::Camera *p_camera; //!
#include
+#include
#include
#include
#include
@@ -260,9 +261,24 @@ namespace Isis {
Hint: If the cube is 'None' the find tool \
will not be active
");
+ p_groundEngine = new QComboBox();
+ p_groundEngine->setEditable(true);
+ p_groundEngine->setToolTip("Ground Engine Selection");
+ p_groundEngine->setWhatsThis("Function: Select whether to use the projection \
+ to determine ground coordinate or the camera. Images with \
+ both can use either, images with only one of either a projection \
+ or a camera will use what is available even if the other is \
+ requested.");
+ p_groundEngine->insertItem(0, "Camera");
+ p_groundEngine->insertItem(1, "Projection");
+ p_groundEngine->setCurrentIndex(0);
+ connect( p_groundEngine, SIGNAL( currentIndexChanged(int) ),
+ this, SLOT( setProjectionEngine(int) ) );
+
QHBoxLayout *layout = new QHBoxLayout(hbox);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(p_statusEdit);
+ layout->addWidget(p_groundEngine);
layout->addWidget(p_showDialogButton);
layout->addWidget(p_linkViewportsButton);
layout->addWidget(p_togglePointVisibleButton);
@@ -548,6 +564,19 @@ namespace Isis {
}
+ //! toggles visibility of the red circle
+ void FindTool::setProjectionEngine(int index) {
+ for (int i = 0; i < cubeViewportList()->size(); i++) {
+ MdiCubeViewport *viewport = ( *( cubeViewportList() ) )[i];
+ UniversalGroundMap *groundMap = viewport->universalGroundMap();
+
+ if (groundMap) {
+ groundMap->setPriority(index);
+ }
+ }
+ }
+
+
//! Links all cubes that have camera models or are map projections
void FindTool::handleLinkClicked() {
MdiCubeViewport *d;
@@ -654,22 +683,20 @@ namespace Isis {
if ( groundMap->SetImage(samp - 0.5, line - 0.5) ) {
double lat1 = groundMap->UniversalLatitude();
double lon1 = groundMap->UniversalLongitude();
+ double radius1 = groundMap->Radius();
if ( groundMap->SetImage(samp + 0.5, line + 0.5) ) {
double lat2 = groundMap->UniversalLatitude();
double lon2 = groundMap->UniversalLongitude();
-
- double radius = groundMap->HasProjection()?
- groundMap->Projection()->LocalRadius() :
- groundMap->Camera()->LocalRadius().meters();
+ double radius2 = groundMap->Radius();
SurfacePoint point1( Latitude(lat1, Angle::Degrees),
Longitude(lon1, Angle::Degrees),
- Distance(radius, Distance::Meters) );
+ Distance(radius1, Distance::Meters) );
SurfacePoint point2( Latitude(lat2, Angle::Degrees),
Longitude(lon2, Angle::Degrees),
- Distance(radius, Distance::Meters) );
+ Distance(radius2, Distance::Meters) );
viewportResolution = point1.GetDistanceToPoint(point2);
}
diff --git a/isis/src/qisis/objs/FindTool/FindTool.h b/isis/src/qisis/objs/FindTool/FindTool.h
index 4da090b88a..5654a395b8 100644
--- a/isis/src/qisis/objs/FindTool/FindTool.h
+++ b/isis/src/qisis/objs/FindTool/FindTool.h
@@ -15,6 +15,7 @@ find files of those names at the top level of this repository. **/
class QAction;
class QCheckBox;
+class QComboBox;
class QLineEdit;
class QTabWidget;
class QToolButton;
@@ -148,6 +149,7 @@ namespace Isis {
void handleLinkClicked();
void handleRecordClicked();
void togglePointVisible();
+ void setProjectionEngine(int index);
private: // methods
void centerLinkedViewports();
@@ -163,6 +165,7 @@ namespace Isis {
QToolButton *p_togglePointVisibleButton;
QCheckBox *p_syncScale;
QLineEdit *p_statusEdit;
+ QComboBox *p_groundEngine;
QTabWidget *p_tabWidget;
GroundTab *p_groundTab;
ImageTab *p_imageTab;
From 7037d4cb6b9b97d842762bf2fdc38d619f628d4a Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Wed, 25 Mar 2026 12:10:51 -0600
Subject: [PATCH 3/9] Remove leftover couts from UGM class
---
isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
index 4a371c1970..c5a33295e8 100644
--- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
+++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
@@ -555,11 +555,9 @@ namespace Isis {
void UniversalGroundMap::setPriority(int priority) {
if (priority == UniversalGroundMap::CameraFirst && HasCamera()) {
- std::cout << "Setting camera priority" << std::endl;
p_priority = (CameraPriority) priority;
}
else if (priority == UniversalGroundMap::ProjectionFirst && HasProjection()) {
- std::cout << "Setting projection priority" << std::endl;
p_priority = (CameraPriority) priority;
}
}
From a86d686e53d4cce0ef533399d80f64e8e2b4734a Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Wed, 25 Mar 2026 16:24:01 -0600
Subject: [PATCH 4/9] Addressed wording for function description
---
isis/src/qisis/objs/FindTool/FindTool.cpp | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/isis/src/qisis/objs/FindTool/FindTool.cpp b/isis/src/qisis/objs/FindTool/FindTool.cpp
index 5657bddf10..ccdd277e84 100644
--- a/isis/src/qisis/objs/FindTool/FindTool.cpp
+++ b/isis/src/qisis/objs/FindTool/FindTool.cpp
@@ -263,13 +263,12 @@ namespace Isis {
p_groundEngine = new QComboBox();
p_groundEngine->setEditable(true);
- p_groundEngine->setToolTip("Ground Engine Selection");
- p_groundEngine->setWhatsThis("Function: Select whether to use the projection \
- to determine ground coordinate or the camera. Images with \
- both can use either, images with only one of either a projection \
- or a camera will use what is available even if the other is \
- requested.");
- p_groundEngine->insertItem(0, "Camera");
+ p_groundEngine->setToolTip("Ground Engine Priority");
+ p_groundEngine->setWhatsThis("Function: Set priortiy use of the projection \
+ or the camera to determine ground coordinates. If both are available, \
+ the selected option takes priority. If only one is available, it will \
+ be used by default.");
+ p_groundEngine->insertItem(0, "Camera");
p_groundEngine->insertItem(1, "Projection");
p_groundEngine->setCurrentIndex(0);
connect( p_groundEngine, SIGNAL( currentIndexChanged(int) ),
From 3dbfc815e2189cd765e996342b7386900c67366a Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Thu, 26 Mar 2026 13:13:28 -0600
Subject: [PATCH 5/9] Change UGM::Radius to UGM::LocalRadius and fix doc string
---
.../src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp | 6 +++---
isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
index c5a33295e8..db3f3215bb 100644
--- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
+++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp
@@ -287,11 +287,11 @@ namespace Isis {
}
/**
- * Returns the resolution of the camera model or projection
+ * Returns the radius of the camera model or projection
*
- * @return Resolution
+ * @return Radius
*/
- double UniversalGroundMap::Radius() const {
+ double UniversalGroundMap::LocalRadius() const {
if (p_priority == CameraFirst) {
return p_camera->LocalRadius().meters();
}
diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h
index 97ba400768..ff62bee393 100644
--- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h
+++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.h
@@ -99,7 +99,7 @@ namespace Isis {
bool SetImage(double sample, double line);
double UniversalLatitude() const;
double UniversalLongitude() const;
- double Radius() const;
+ double LocalRadius() const;
double Resolution() const;
bool GroundRange(Cube *cube,
From 797619bebb7ddee774b2aa28d8d998573f58dfa2 Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Thu, 26 Mar 2026 13:15:32 -0600
Subject: [PATCH 6/9] Fix typo in new combobox function string
---
isis/src/qisis/objs/FindTool/FindTool.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/isis/src/qisis/objs/FindTool/FindTool.cpp b/isis/src/qisis/objs/FindTool/FindTool.cpp
index ccdd277e84..703c8ee181 100644
--- a/isis/src/qisis/objs/FindTool/FindTool.cpp
+++ b/isis/src/qisis/objs/FindTool/FindTool.cpp
@@ -264,7 +264,7 @@ namespace Isis {
p_groundEngine = new QComboBox();
p_groundEngine->setEditable(true);
p_groundEngine->setToolTip("Ground Engine Priority");
- p_groundEngine->setWhatsThis("Function: Set priortiy use of the projection \
+ p_groundEngine->setWhatsThis("Function: Set priority use of the projection \
or the camera to determine ground coordinates. If both are available, \
the selected option takes priority. If only one is available, it will \
be used by default.");
@@ -682,12 +682,12 @@ namespace Isis {
if ( groundMap->SetImage(samp - 0.5, line - 0.5) ) {
double lat1 = groundMap->UniversalLatitude();
double lon1 = groundMap->UniversalLongitude();
- double radius1 = groundMap->Radius();
+ double radius1 = groundMap->LocalRadius();
if ( groundMap->SetImage(samp + 0.5, line + 0.5) ) {
double lat2 = groundMap->UniversalLatitude();
double lon2 = groundMap->UniversalLongitude();
- double radius2 = groundMap->Radius();
+ double radius2 = groundMap->LocalRadius();
SurfacePoint point1( Latitude(lat1, Angle::Degrees),
Longitude(lon1, Angle::Degrees),
From 09f47c5fdd9eabce3dc7c6e645abe1377e4aa033 Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Thu, 26 Mar 2026 13:16:11 -0600
Subject: [PATCH 7/9] Fix GroundGrid to properly handle new UGM priority
---
isis/src/base/objs/GroundGrid/GroundGrid.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/isis/src/base/objs/GroundGrid/GroundGrid.cpp b/isis/src/base/objs/GroundGrid/GroundGrid.cpp
index 4088741c82..f28546e9e0 100644
--- a/isis/src/base/objs/GroundGrid/GroundGrid.cpp
+++ b/isis/src/base/objs/GroundGrid/GroundGrid.cpp
@@ -83,7 +83,7 @@ namespace Isis {
p_mapping = new PvlGroup;
- if (p_groundMap->Camera()) {
+ if (p_groundMap->currentPriority() == 0) {
Pvl tmp;
p_groundMap->Camera()->BasicMapping(tmp);
*p_mapping = tmp.findGroup("Mapping");
@@ -146,7 +146,7 @@ namespace Isis {
// p_defaultResolution is in degrees/pixel
- if (p_groundMap->HasCamera()) {
+ if (p_groundMap->currentPriority() == 0) {
p_defaultResolution =
(p_groundMap->Camera()->HighestImageResolution() /
largerRadius.meters()) * 10;
From 472fc72d73a8c3672050a40ebcaf459c472f8daf Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Thu, 26 Mar 2026 13:16:42 -0600
Subject: [PATCH 8/9] Fix SpatialPlotTool to handle new UGM priority
---
isis/src/qisis/objs/SpatialPlotTool/SpatialPlotTool.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/isis/src/qisis/objs/SpatialPlotTool/SpatialPlotTool.cpp b/isis/src/qisis/objs/SpatialPlotTool/SpatialPlotTool.cpp
index 27c7758f3f..d5a059b042 100644
--- a/isis/src/qisis/objs/SpatialPlotTool/SpatialPlotTool.cpp
+++ b/isis/src/qisis/objs/SpatialPlotTool/SpatialPlotTool.cpp
@@ -290,13 +290,7 @@ namespace Isis {
SurfacePoint result;
if (groundMap) {
- Distance radius;
-
- if (groundMap->Camera())
- radius = groundMap->Camera()->LocalRadius();
- else if (groundMap->Projection())
- radius = Distance(groundMap->Projection()->LocalRadius(), Distance::Meters);
-
+ Distance radius(groundMap->LocalRadius(), Distance::Units::Meters);
result = SurfacePoint(Latitude(groundMap->UniversalLatitude(), Angle::Degrees),
Longitude(groundMap->UniversalLongitude(), Angle::Degrees), radius);
}
From cd00663af5cbbad73657d321460816e66efd1906 Mon Sep 17 00:00:00 2001
From: Adam Paquette
Date: Thu, 26 Mar 2026 13:16:59 -0600
Subject: [PATCH 9/9] Small fix to UGM test
---
.../src/base/objs/UniversalGroundMap/UniversalGroundMap.truth | 4 ++--
isis/src/base/objs/UniversalGroundMap/unitTest.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.truth b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.truth
index 5db6dd6c22..d1d1b4e197 100644
--- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.truth
+++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.truth
@@ -30,7 +30,7 @@ Sample = 1203.99978
Line = 1056.0001
Testing Projection...
-Is Projection? = 1
+Has Projection? = 1
For (2.0, 5.0) ...
Universal Latitude = 89.9727
@@ -57,7 +57,7 @@ Sample = 23040
Line = 11520
Testing Camera Model and Projection...
-Is Projection? = 0
+Is Projection? = 1
For (1.0, 5.0) ...
Universal Latitude = -86.9422124
diff --git a/isis/src/base/objs/UniversalGroundMap/unitTest.cpp b/isis/src/base/objs/UniversalGroundMap/unitTest.cpp
index b2f788953a..226d5fd944 100644
--- a/isis/src/base/objs/UniversalGroundMap/unitTest.cpp
+++ b/isis/src/base/objs/UniversalGroundMap/unitTest.cpp
@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
if (ugm.SetGround(
SurfacePoint(Latitude(ugm.UniversalLatitude(), Angle::Degrees),
Longitude(ugm.UniversalLongitude(), Angle::Degrees),
- ugm.Camera()->LocalRadius()))) {
+ Distance(ugm.LocalRadius(), Distance::Units::Meters)))) {
cout << "Sample = " << ugm.Sample() << endl;
cout << "Line = " << ugm.Line() << endl << endl;
}
@@ -91,7 +91,7 @@ int main(int argc, char *argv[]) {
cout << " Testing Projection..." << endl;
Cube c2("$base/dems/molaMarsPlanetaryRadius0001.cub", "r");
UniversalGroundMap ugm2(c2);
- cout << "Is Projection? = " << ugm2.HasProjection() << endl << endl;
+ cout << "Has Projection? = " << ugm2.HasProjection() << endl << endl;
// Test all four corners to make sure the conversions are right
cerr << "For (2.0, 5.0) ..." << endl;