NCL Home > Documentation > HLUs > Classes

Transformation class

The Transformation classes manage forward and reverse transformations for the Transform classes.

Synopsis

Header file:		ncarg/hlu/Transformation.h
Class name:		transformationClass
Class pointer:		<Not referenceable>
Fortran class function:	<Not referenceable>
Superclass:		Obj
Composite classes:	<None>

Class-defined types


Type name:              NhlTGridType
Definition:
typedef enum _NhlGridType {
	NhltrMAP               = 0      /* "Map" */
        NhltrLOGLIN            = 1,     /* "LogLin" */
        NhltrIRREGULAR         = 2,     /* "Irregular"   */
	NhltrCURVILINEAR       = 3,     /* "Curvilinear" */
	NhltrSPHERICAL         = 4,     /* "Spherical" */
        NhltrTRIANGULARMESH    = 5      /* "TriangularMesh" */
} NhlGridType;


Resources

Local resources

+---------------------------------------------------------------+
|		Transformation Resource Set			|
|---------------------------------------------------------------|
| NAME				TYPE			ACCESS	|
|	CLASS				DEFAULT			|
|===============================================================|
| trXMinF                       NhlTFloat               RCSG    |
|       TrXMinF                         0.0                     |
|---------------------------------------------------------------|
| trXMaxF                       NhlTFloat               RCSG    |
|       TrXMaxF                         1.0                     |
|---------------------------------------------------------------|
| trXReverse                    NhlTBoolean             RCSG    |
|       TrXReverse                      False                   |
|---------------------------------------------------------------|
| trYMinF                       NhlTFloat               RCSG    |
|       TrYMinF                         0.0                     |
|---------------------------------------------------------------|
| trYMaxF                       NhlTFloat               RCSG    |
|       TrYMaxF                         1.0                     |
|---------------------------------------------------------------|
| trYReverse                    NhlTBoolean             RCSG    |
|       TrYReverse                      False                   |
|---------------------------------------------------------------|
| trGridType                    NhlTGridType            RCSG    |
|       TrGridType                      False                   |
|---------------------------------------------------------------|
| trLineInterpolationOn         NhlTBoolean             RCSG    |
|       TrLineInterpolationOn           False                   |
+---------------------------------------------------------------+

Composite resources

The Transformation object class has no composite class resources.

Superclass resources

The superclass of the Transformation object class does not define any resources.


Description

Transformation class objects perform forward and reverse transformations between data and NDC space for objects belonging to Transform class. You do not instantiate any of these objects directly. Rather, Transform class objects (plot objects) create them as needed, and provide controlled access to their resources.

The Transformation class is never itself instantiated. However, it does provide some basic resources that its subclasses may use to specify the extent and direction of the data space. Currently there are five subclasses of the Transformation class:

In most cases the plot object decides which Transformation sub-class to use based on its intrinsic requirements or on information provided by the data object. However, when data is supplied with 2D coordinate grids, there is no clear way for a plot object to decide between the possible transformations. In this case, the user can specify a preference using the trGridType resource.

Support functions

There are no special support functions defined for the Transformation class or its superclass.

Status notes

1. When line interpolation is turned on, the quality of the interpolation into data space is not always very good, particularly for log plots.


See also