next up previous 229
Next: Retrieving classification information.
Up: Classifying Transformations
Previous: Inserting classification information.

Example 11. Inserting classification information.

*  Declare variables.
      INCLUDE 'TRN_PAR'
      LOGICAL CLASS( TRN__MXCLS )                      [1]

*  Create a (temporary) transformation.
      CALL TRN_NEW( NVIN, NVOUT, FOR, INV, PREC,       [2]
     :              ' ', ' ', LOCTR, STATUS )

*  Set up the logical classification array.
      DO 1 I = 1, TRN__MXCLS                           [3]
         CLASS( I ) = .FALSE.
    1 CONTINUE
      CLASS( TRN__LIN ) = .TRUE.                       [4]
      CLASS( TRN__DIAG ) = .TRUE.
      CLASS( TRN__ISOT ) = .TRUE.
      CLASS( TRN__POSDT ) = .TRUE.

*  Enter the classification information.
      CALL TRN_PTCL( CLASS, LOCTR, STATUS )            [5]

Programming notes:

  1. A 1-dimensional logical array CLASS is declared with TRN__MXCLS elements (this symbolic constant specifies the number of basic classification properties currently recognised and is defined in the include file TRN_PAR).

  2. A transformation is created. At this point it does not contain any classification information.

  3. All elements of the CLASS array are explicitly initialised to .FALSE. - this precaution is recommended so that the number of basic classification properties may be increased in future without adversely affecting existing software.

  4. The required array elements are set to .TRUE. - in this example the classification describes a simple linear magnification about a point with a positive magnification factor (see Table [*] in Appendix [*]). Symbolic constants (also defined in the include file TRN_PAR) are used to identify the array elements concerned.

  5. The classification information is entered into the transformation by calling TRN_PTCL.



next up previous 229
Next: Retrieving classification information.
Up: Classifying Transformations
Previous: Inserting classification information.

TRANSFORM Coordinate Transformation Facility
Starlink User Note 61
R.F. Warren-Smith
12th January 2006
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils