Bug #5242

Bug in EquatorialCylindricalShape class

Added by Jeff Anderson 18 days ago. Updated 2 days 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 15 days ago

  • Project changed from PDS to ISIS

#2 Updated by Tammy Becker 15 days ago

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

#3 Updated by Jean Backer 2 days ago

  • Assignee set to Jean Backer

Also available in: Atom PDF