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

Example 12. Retrieving classification information.

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

*  Get the classification information.
      CALL TRN_GTCL( LOCTR, .TRUE., CLASS, STATUS )    [2]

*  Test for the required properties.
      OK = CLASS( TRN__LIN ) .AND.                     [3]
     :     CLASS( TRN__ISOT )

Programming notes:

  1. A logical array CLASS is declared with TRN__MXCLS elements.

  2. TRN_GTCL is called to retrieve classification information from a transformation, returning it in the CLASS array. The second (logical) argument to TRN_GTCL is set .TRUE. in this example, which indicates that information is required about the forward mapping (as opposed to the inverse mapping). An error would result if this mapping were not defined.

  3. The appropriate elements of the CLASS array are tested to determine whether the mapping has the required property. In this case, OK is set .TRUE. if the forward mapping is LINEAR and ISOTROPIC. In two dimensions this would ensure that it preserves straight lines, angles and shapes (e.g. circles).

The routine TRN_GTCLC (get compiled classification) is also provided to retrieve classification information from compiled mappings (Appendix [*]).



next up previous 229
Next: Automatic classification processing.
Up: Classifying Transformations
Previous: Retrieving 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