Unverified Commit 63490c5e authored by Kristin's avatar Kristin Committed by GitHub
Browse files

Merge pull request #413 from jessemapel/m05425

Fixed cam2cam looking for the wrong ground point on irregular bodies. Fixes #5425
parents 5d3ac014 662bf53e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
#include "Isis.h"
#include "CameraFactory.h"
#include "Camera.h"
#include "Distance.h"
#include "ProcessRubberSheet.h"
#include "IException.h"
#include "cam2cam.h"
@@ -118,7 +119,13 @@ bool cam2cam::Xform(double &inSample, double &inLine,
  // Get the universal lat/lon and see if it can be converted to input line/samp
  double lat = p_outcam->UniversalLatitude();
  double lon = p_outcam->UniversalLongitude();
  Distance rad = p_outcam->LocalRadius();
  if (rad.isValid()) {
    if(!p_incam->SetUniversalGround(lat, lon, rad.meters())) return false;
  }
  else {
    if(!p_incam->SetUniversalGround(lat, lon)) return false;
  }

  // Make sure the point is inside the input image
  if(p_incam->Sample() < 0.5) return false;
+12 −8
Original line number Diff line number Diff line
@@ -46,6 +46,11 @@
    <change name="Steven Lambright" date="2008-05-12">
          Removed references to CubeInfo
    </change>
    <change name="Jesse Mapel" date="2018-05-17">
          Changed transform to use the local radius computed by the output camera instead of
          having the input camera re-compute it (sometimes incorrectly) from the latitude and
          longitude. Fixes #5425.
    </change>
  </history>

  <oldName>
@@ -152,4 +157,3 @@
    </group>
  </groups>
</application>