Bug #5242

Bug in EquatorialCylindricalShape class

Added by Jeff Anderson over 1 year ago. Updated about 1 year ago.

Target version:
Software Version:
Test Reviewer:


There is a minor bug in the EquatorialCylindricalShape/DemShape/ShapeModel classes. The bug causes a failure to intersect the DTM in high emission angle images (oblique views) using local DTMs created from SOCET and run through demprep. Without the successful intersection of the DTM programs like phocube and qview return NULL values for lat/lon/phase/incidience/emission. The problem is very straightforward. In the EquatorialCylindricalShape::intersectSurface method the first option tried is the DemShape::intersectSurface method. This is fine except that method chooses a starting radius in the iteration for the shape intersection to be the a-axis of the triaxial ellipsoid. Unfortunately this can be well above the local radius of SOCET DTM which causes a failure in first iteration. A better option that actually works is to use the maximum radius written to the cube labels during the demprep program. I have made this change locally at ASU and verified it fixes the problem. It would be wonderful if this change could be put into the ISIS system.

The fix is straightforward. Make the ShapeModel::intersectEllipsoid method virtual and then override in the EquatorialCylindricalShape class. The code is ShapeModel and EquatorialCylindricalShape is nearly identical except ShapeModel uses the triaxial ellipsoid values and EquatorialCylindricalShape uses the values written to the cube labels during demprep. I also made the private variable m_hasEllipsoidIntersection protected so I could use it. It might be better to have a protected method to set this class variable but I didn't take the time to make this fix. Your call.

I have attached three files that have the code changes. The cube files I have for testing are quite big and can not be uploaded in the ticket tracking system. Please contact me when you would like access to the files.

bugfix.tar.gz - tarball with changes to source code (7.31 KB) Jeff Anderson, 2017-11-27 10:59 AM


#1 Updated by Jeff Anderson over 1 year ago

  • Project changed from PDS to ISIS

#2 Updated by Tammy Becker over 1 year ago

  • Category set to API
  • Status changed from New to Acknowledged

#3 Updated by Jean Backer over 1 year ago

  • Assignee set to Jean Backer

#4 Updated by Stuart Sides about 1 year ago

  • Target version set to 3.5.2 (2017-01-31 Jan)

#5 Updated by Cole Neubauer about 1 year ago

  • Assignee changed from Jean Backer to Cole Neubauer

#6 Updated by Cole Neubauer about 1 year ago

  • Status changed from Acknowledged to In Progress

#7 Updated by Cole Neubauer about 1 year ago

Ran unit test for the code affected after merging his code, they pass.

#8 Updated by Cole Neubauer about 1 year ago

setisis /work/projects/isis/latest/m05242/isis built on prog24, preemptively it is not ready for testing, needs to be code reviewed first.

The changes in EquatorialCylindricalShape.cpp
lines changed are from 414 to 472

The changes in EquatorialCylindricalShape.h
lines changed are from 50 to 79 and 53 to 71

The changes in ShapeModel.h
lines changed are from 70 to 71 and 181 to 185 and 191

#9 Updated by Ian Humphrey about 1 year ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF