parameters: (cubePath, workDir='tmp')
return_statement: return centerLatitude
docstring: Calls caminfo on a cube and returns the CenterLatitude value
docstring_summary: Calls caminfo on a cube and returns the CenterLatitude value
docstring_tokens: Calls caminfo on a cube and returns the CenterLatitude value
function: def getCubeCenterLatitude(cubePath, workDir='tmp'):
      """Calls caminfo on a cube and returns the CenterLatitude value"""
  
      # Make sure the requested file is present
      if not os.path.exists(cubePath):
          raise Exception('File ' + cubePath + ' does not exist!')
  
      # Call caminfo (from ISIS) on the input cube to find out the CenterLatitude value
      camInfoOuputPath = workDir + "/camInfoOutput.txt"
      cmd = 'caminfo from=' + cubePath + ' to=' + camInfoOuputPath
      print (cmd)
      os.system(cmd)
  
      if not os.path.exists(camInfoOuputPath):
          raise Exception('Call to caminfo failed on file ' + cubePath)
  
      # Read in the output file to extract the CenterLatitude value
      centerLatitude = -9999
      infoFile       = open(camInfoOuputPath, 'r')
      for line in infoFile:
          if (line.find('CenterLatitude') >= 0):
              centerLatitude = asp_string_utils.getNumberAfterEqualSign(line, )
              break
      # Make sure we found the desired value
      if (centerLatitude == -9999) or (asp_string_utils.isString(centerLatitude)):
          raise Exception("Unable to find CenterLatitude from file " + cubePath)
  
      # Clean up temporary file
      os.remove(camInfoOuputPath)
      
      return centerLatitude
function_tokens: def getCubeCenterLatitude ( cubePath , workDir = 'tmp' ) : # Make sure the requested file is present if not os . path . exists ( cubePath ) : raise Exception ( 'File ' + cubePath + ' does not exist!' ) # Call caminfo (from ISIS) on the input cube to find out the CenterLatitude value camInfoOuputPath = workDir + "/camInfoOutput.txt" cmd = 'caminfo from=' + cubePath + ' to=' + camInfoOuputPath print ( cmd ) os . system ( cmd ) if not os . path . exists ( camInfoOuputPath ) : raise Exception ( 'Call to caminfo failed on file ' + cubePath ) # Read in the output file to extract the CenterLatitude value centerLatitude = - 9999 infoFile = open ( camInfoOuputPath , 'r' ) for line in infoFile : if ( line . find ( 'CenterLatitude' ) >= 0 ) : centerLatitude = asp_string_utils . getNumberAfterEqualSign ( line , ) break # Make sure we found the desired value if ( centerLatitude == - 9999 ) or ( asp_string_utils . isString ( centerLatitude ) ) : raise Exception ( "Unable to find CenterLatitude from file " + cubePath ) # Clean up temporary file os . remove ( camInfoOuputPath ) return centerLatitude