Index Page
cspice_ekcii
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_EKCII returns the attribute information of a column
   in an EK table, specifying the column by table name
   and column index. 

   For important details concerning this module's function, please refer to
   the CSPICE routine ekcii_c.

I/O

   
   Given:
   
      table    the scalar string name of a loaded table
      cindex   the scalar integer index of a column in
               'table'
   
   the call:
   
      cspice_ekcii, table, cindex, column, attdsc
   
   returns:
   
      column   the scalar string name of the column 
               corresponding to index 'cindex'
      attdsc   a structure of type CSPICE_EKATTDSC which contains
               the attribute information of 'column'
   
                  The members of CSPICE_EKATTDSC consist of:
   
                  CCLASS   integer column class code
                  DTYPE    integer data type code
                  STRLEN   integer string length
                  SIZE     integer column entry size, has value
                           SPICE_EK_VARSIZ (-1) for variable size entries
                  INDEXD   boolean flag, true if column is indexed
                  NULLOK   boolean flag, true if column value
                           allows nulls
   
                  See the header file SpiceEK.h for additional details.
   

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   
      ;;
      ;; Assign the name of an EK file.
      ;;
      EK      = 'test_file.ek'
   
      ;;
      ;; Assign character arrays to translate index values.
      ;;
      typstrs = [ "CHR", "DP", "INT", "TIME" ]
      indexed = [ "FALSE", "TRUE" ]
      null    = [ "FALSE", "TRUE" ]
   
      ;;
      ;; Load an EK.
      ;;
      cspice_furnsh, EK
   
      ;;
      ;; How many loaded tables in the active EK?
      ;;
      cspice_ekntab, num_table
      print, 'Number of tables in EK: ', num_table
   
      ;;
      ;; Loop over the number of tables.
      ;;
      for i=0, (num_table - 1 ) do begin
   
         ;;
         ;; Retrieve the name of each table.
         ;;
         cspice_ektnam, i, table_name
   
         ;;
         ;; Retrieve the number of columns for each table.
         ;;
         cspice_ekccnt, table_name, num_cols
         print
         print, '   Table: ', table_name, ' number of columns: ', num_cols
   
         for j=1, (num_cols-1) do begin
   
            ;;
            ;; Retrieve the column name corresponding to the
            ;; index j and the structure of column attributes.
            ;;
            cspice_ekcii, table_name, j, column_name, attdsc
            print
            print, '      Column: ', column_name
            print, '        class: ', attdsc.cclass
            print, '         type: ', typstrs[attdsc.dtype]
   
            ;;
            ;; If a character column, return the value of the
            ;; string length.
            ;;
            if ( typstrs[attdsc.dtype] EQ "CHR" ) then begin
               print, '       length: ', attdsc.strlen
            endif
   
            print, '         size: ', attdsc.size
            print, '      indexed: ', indexed[attdsc.indexd]
            print, '      null ok: ', null[attdsc.nullok]
         endfor  
   
      endfor
   
      ;;
      ;; Unload the kernel.
      ;;
      cspice_unload, EK
   
   IDL outputs:
   
      Number of tables in EK:            6
   
      Table: SCALAR_1 number of columns:            8
   
         Column: FILE_NO
           class:            1
            type: INT
            size:            1
         indexed: FALSE
         null ok: FALSE
   
         .. continues ...
   
         Column: T_COL_1
           class:            2
            type: TIME
            size:            1
         indexed: FALSE
         null ok: FALSE
   
      Table: SCALAR_2 number of columns:           19
   
         Column: FILE_NO
           class:            1
            type: INT
            size:            1
         indexed: TRUE
         null ok: FALSE
   
         .. continues ...
   
         Column: T_COL_3
           class:            2
            type: TIME
            size:            1
         indexed: TRUE
         null ok: TRUE
   
      Table: SCALAR_3 number of columns:            8
   
         Column: FILE_NO
           class:            7
            type: INT
            size:            1
         indexed: FALSE
         null ok: FALSE
   
         .. continues ...
   
         Column: T_COL_1
           class:            8
            type: TIME
            size:            1
         indexed: FALSE
         null ok: FALSE
   
      Table: SCALAR_4 number of columns:           16
   
         Column: FILE_NO
           class:            7
            type: INT
            size:            1
         indexed: TRUE
         null ok: FALSE
   
         .. continues ...
   
         Column: T_COL_3
           class:            8
            type: TIME
            size:            1
         indexed: TRUE
         null ok: TRUE
   
      Table: VECTOR_1 number of columns:           12
   
         Column: FILE_NO
           class:            1
            type: INT
            size:            1
         indexed: FALSE
         null ok: FALSE
   
         .. continues ...
   
         Column: T_COL_2
           class:            5
            type: TIME
            size:           -1
         indexed: FALSE
         null ok: FALSE
   
      Table: VECTOR_2 number of columns:           20
   
         Column: FILE_NO
           class:            1
            type: INT
            size:            1
         indexed: TRUE
         null ok: FALSE
   
         .. continues ...
   
         Column: T_COL_4
           class:            5
            type: TIME
            size:           -1
         indexed: FALSE
         null ok: TRUE

Particulars


   None.

Required Reading


   ICY.REQ
   EK.REQ

Version


   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   return information on loaded EK column specified by index 
 



Wed Apr  5 17:58:00 2017