MapTransObj class

The MapTransObj object manages forward and backward transformations in the coordinate space defined by various map projections.


Synopsis

Header file:		ncarg/hlu/MapTransObj.h
Class name:		mapTransObjClass
Class pointer:		<Not referenceable>
Fortran class function:	<Not referenceable>
Supeclass:		TransObj
Composite classes:	<None>

Class-defined types

Type name:		NhlTMapLimitMode
Definition:
typedef enum _NhlMapLimitMode {
	NhlMAXIMALAREA	= 0,	/* "MaximalArea" */ 
	NhlLATLON	= 1,	/* "LatLon"	 */ 
	NhlANGLES	= 2,	/* "Angles"	 */ 
	NhlNPC		= 3,	/* "NPC"	 */
	NhlNDC		= 4,	/* "NDC"	 */
	NhlCORNERS	= 5,	/* "Corners"	 */ 
	NhlPOINTS	= 6,	/* "Points"	 */
	NhlWINDOW	= 7	/* "Window"	 */ 
} NhlMapLimitMode;

Type name:		NhlTProjection
Definition:
typedef enum _NhlProjection {
	NhlORTHOGRAPHIC		  = 0, /* "Orthographic"	   */
	NhlSTEREOGRAPHIC	  = 1, /* "Stereographic"	   */
	NhlLAMBERTEQUALAREA	  = 2, /* "LambertEqualArea"	   */
	NhlGNOMONIC		  = 3, /* "Gnomonic"		   */
	NhlAZIMUTHALEQUIDISTANT	  = 4, /* "AzimuthalEquidistant"   */
	NhlSATELLITE		  = 5, /* "Satellite"		   */
	NhlMOLLWEIDE		  = 6, /* "Mollweide"		   */
	NhlMERCATOR		  = 7, /* "Mercator"		   */
	NhlCYLINDRICALEQUIDISTANT = 8, /* "CylindricalEquidistant" */
	NhlLAMBERTCONFORMAL	  = 9  /* "LambertConformal"	   */
} NhlProjection;

Resources

Local resources

You may access MapTransObj resources only through objects that instantiate a MapTransObj child object. These include:
+---------------------------------------------------------------+
|			MapTransObj Resource Set		|
|---------------------------------------------------------------|
| NAME				TYPE			ACCESS	|
|	CLASS				DEFAULT			|
|===============================================================|
| mpProjection                  NhlTProjection          RCSG    |
|       MpProjection                  "CylindricalEquidistant"  |
|---------------------------------------------------------------|
| mpPreserveAspectRatio         NhlTBoolean             RCSG    |
|       MpPreserveAspectRatio           True                    |
|---------------------------------------------------------------|
| mpLeftMapPosF                 NhlTFloat               G       |
|       MpLeftMapPosF                   <dynamic>               |
|---------------------------------------------------------------|
| mpRightMapPosF                NhlTFloat               G       |
|       MpRightMapPosF                  <dynamic>               |
|---------------------------------------------------------------|
| mpBottomMapPosF               NhlTFloat               G       |
|       MpBottomMapPosF                 <dynamic>               |
|---------------------------------------------------------------|
| mpTopMapPosF                  NhlTFloat               G       |
|       MpTopMapPosF                    <dynamic>               |
|---------------------------------------------------------------|
| mpCenterLatF                  NhlTFloat               RCSG    |
|       MpCenterLatF                    0.0                     |
|---------------------------------------------------------------|
| mpCenterLonF                  NhlTFloat               RCSG    |
|       MpCenterLonF                    0.0                     |
|---------------------------------------------------------------|
| mpCenterRotF                  NhlTFloat               RCSG    |
|       MpCenterRotF                    0.0                     |
|---------------------------------------------------------------|
| mpLimitMode                   NhlTMapLimitMode        RCSG    |
|       MpLimitMode                     "MaximalArea"           |
|---------------------------------------------------------------|
| mpMinLatF                     NhlTFloat               RCSG    |
|       MpMinLatF                       -90.0                   |
|---------------------------------------------------------------|
| mpMaxLatF                     NhlTFloat               RCSG    |
|       MpMaxLatF                       90.0                    |
|---------------------------------------------------------------|
| mpMinLonF                     NhlTFloat               RCSG    |
|       MpMinLonF                       -180.0                  |
|---------------------------------------------------------------|
| mpMaxLonF                     NhlTFloat               RCSG    |
|       MpMaxLonF                       180.0                   |
|---------------------------------------------------------------|
| mpRelativeCenterLat           NhlTBoolean             RCSG    |
|       MpRelativeCenterLat             False                   |
|---------------------------------------------------------------|
| mpRelativeCenterLon           NhlTBoolean             RCSG    |
|       MpRelativeCenterLon             False                   |
|---------------------------------------------------------------|
| mpLeftAngleF                  NhlTFloat               RCSG    |
|       MpLeftAngleF                    80.0                    |
|---------------------------------------------------------------|
| mpRightAngleF                 NhlTFloat               RCSG    |
|       MpRightAngleF                   80.0                    |
|---------------------------------------------------------------|
| mpBottomAngleF                NhlTFloat               RCSG    |
|       MpBottomAngleF                  80.0                    |
|---------------------------------------------------------------|
| mpTopAngleF                   NhlTFloat               RCSG    |
|       MpTopAngleF                     80.0                    |
|---------------------------------------------------------------|
| mpLeftNPCF                    NhlTFloat               RCSG    |
|       MpLeftNPCF                      0.0                     |
|---------------------------------------------------------------|
| mpRightNPCF                   NhlTFloat               RCSG    |
|       MpRightNPCF                     1.0                     |
|---------------------------------------------------------------|
| mpBottomNPCF                  NhlTFloat               RCSG    |
|       MpBottomNPCF                    0.0                     |
|---------------------------------------------------------------|
| mpTopNPCF                     NhlTFloat               RCSG    |
|       MpTopNPCF                       1.0                     |
|---------------------------------------------------------------|
| mpLeftNDCF                    NhlTFloat               RCSG    |
|       MpLeftNDCF                      <dynamic>               |
|---------------------------------------------------------------|
| mpRightNDCF                   NhlTFloat               RCSG    |
|       MpRightNDCF                     <dynamic>               |
|---------------------------------------------------------------|
| mpBottomNDCF                  NhlTFloat               RCSG    |
|       MpBottomNDCF                    <dynamic>               |
|---------------------------------------------------------------|
| mpTopNDCF                     NhlTFloat               RCSG    |
|       MpTopNDCF                       <dynamic>               |
|---------------------------------------------------------------|
| mpLeftCornerLatF              NhlTFloat               RCSG    |
|       MpLeftCornerLatF                0.0                     |
|---------------------------------------------------------------|
| mpLeftCornerLonF              NhlTFloat               RCSG    |
|       MpLeftCornerLonF                0.0                     |
|---------------------------------------------------------------|
| mpRightCornerLatF             NhlTFloat               RCSG    |
|       MpRightCornerLatF               0.0                     |
|---------------------------------------------------------------|
| mpRightCornerLonF             NhlTFloat               RCSG    |
|       MpRightCornerLonF               0.0                     |
|---------------------------------------------------------------|
| mpLeftPointLatF               NhlTFloat               RCSG    |
|       MpLeftPointLatF                 0.0                     |
|---------------------------------------------------------------|
| mpLeftPointLonF               NhlTFloat               RCSG    |
|       MpLeftPointLonF                 0.0                     |
|---------------------------------------------------------------|
| mpRightPointLatF              NhlTFloat               RCSG    |
|       MpRightPointLatF                0.0                     |
|---------------------------------------------------------------|
| mpRightPointLonF              NhlTFloat               RCSG    |
|       MpRightPointLonF                0.0                     |
|---------------------------------------------------------------|
| mpBottomPointLatF             NhlTFloat               RCSG    |
|       MpBottomPointLatF               0.0                     |
|---------------------------------------------------------------|
| mpBottomPointLonF             NhlTFloat               RCSG    |
|       MpBottomPointLonF               0.0                     |
|---------------------------------------------------------------|
| mpTopPointLatF                NhlTFloat               RCSG    |
|       MpTopPointLatF                  0.0                     |
|---------------------------------------------------------------|
| mpTopPointLonF                NhlTFloat               RCSG    |
|       MpTopPointLonF                  0.0                     |
|---------------------------------------------------------------|
| mpLeftWindowF                 NhlTFloat               RCSG    |
|       MpLeftWindowF                   0.0                     |
|---------------------------------------------------------------|
| mpRightWindowF                NhlTFloat               RCSG    |
|       MpRightWindowF                  0.0                     |
|---------------------------------------------------------------|
| mpBottomWindowF               NhlTFloat               RCSG    |
|       MpBottomWindowF                 0.0                     |
|---------------------------------------------------------------|
| mpTopWindowF                  NhlTFloat               RCSG    |
|       MpTopWindowF                    0.0                     |
|---------------------------------------------------------------|
| mpLambertParallel1F           NhlTFloat               RCSG    |
|       MpLambertParallel1F             .001                    |
|---------------------------------------------------------------|
| mpLambertParallel2F           NhlTFloat               RCSG    |
|       MpLambertParallel2F             89.999                  |
|---------------------------------------------------------------|
| mpLambertMeridianF            NhlTFloat               RCSG    |
|       MpLambertMeridianF              0.0                     |
|---------------------------------------------------------------|
| mpSatelliteDistF              NhlTFloat               RCSG    |
|       MpSatelliteDistF                1.0                     |
|---------------------------------------------------------------|
| mpSatelliteAngle1F            NhlTFloat               RCSG    |
|       MpSatelliteAngle1F              0.0                     |
|---------------------------------------------------------------|
| mpSatelliteAngle2F            NhlTFloat               RCSG    |
|       MpSatelliteAngle2F              0.0                     |
|---------------------------------------------------------------|
| mpEllipticalBoundary          NhlTBoolean             RCSG    |
|       MpEllipticalBoundary            False                   |
+---------------------------------------------------------------+

Composite resources

The MapTransObj class has no composite class objects.

Superclass resources

You can set all resources defined by the superclasses of the MapTransObj object class, including:

Description

The MapTransObj transforms a two-dimensional rectangular data coordinate space representing latitude along the vertical axis and longitude along the horizontal axis into any of 10 different map projections. The data space extent may coincide with, encompass, or arbitrarily intersect the projected extent.

You do not create objects of the MapTransObj class directly. You may, however, set its resources via objects that instantiate a MapTransObj child. Currently, the MapPlot object is the only HLU library object with a MapTransObj child; it allows access to almost all MapTransObj resources, depending on it to provide transformations of data representing geophysical and political regions of the earth. However, by using the MapPlot as a base plot, you can provide map transformations for other plot object types.

You can force the map projection to maintain its true aspect ratio by setting the boolean resource mpPreserveAspectRatio True. This will cause MapTransObj center the projected area within the supplied viewport. Since in this case the projected area's boundaries probably do not coincide with the supplied viewport boundaries, the MapTransObj supplies four read-only resources that allow you to retrieve the edges of the actual projected area. These are mpLeftMapPosF, mpRightMapPosF, mpBottomMapPosF, and mpTopMapPosF.

You define a map transformation by setting the mpProjection resource, and then in most cases, choosing a center of projection and a rotation angle using the resources, mpCenterLatF, mpCenterLonF, and mpCenterRotF. Then you choose a method for defining the visible extent of the global surface using the mpLimitMode resource. This resource has eight possible settings:

When the conic projection, LambertConformal, is set, the MapTransObj ignores the projection center and rotation resources. Instead, use mpLambertParallel1F and mpLambertParallel2F to set the two latitudinal edges of the cone and mpLambertMeridianF its longitudinal center. If the projection is NhlSATELLITE, the MapTransObj provides several additional resources for controlling the perspective effect. mpSatelliteDistF defines the distance of the viewing satellite from the center of the globe in multiples of the global radius. mpSatelliteAngle1F defines the angular deviation of the line of sight from a line between the satellite position and the center of the globe. mpSatelliteAngle2F defines the direction of the angular deviation of the line of sight as a rotation from the horizontal axis of the viewplane.

You can also set a resource, mpEllipticalBoundary, that limits the perimeter of the viewable area to an ellipse inscribed within the rectangular viewport.


Support functions

The MapTransObj object does not define any support functions, but inherits all the support functions available to its superclass.

Status

2: Range checking is inadequate for a number of the MapTransObj resources including mpLambertMeridianF, mpLambertParallel2F, mpLambertParallel1F, mpCenterLatF, and mpCenterLonF.

3: When mpCenterRotF has a non-zero value and mpMapLimitMode is set to NhlANGLES, it is possible that errors may occur even when the angle values are within the documented limits. This occurs in certain situations that have so far proved to be difficult to pin down. More work is required.


See also


Copyright

Copyright 1987,1988,1989,1991,1993,1994,1995
University Corporation for Atmospheric Research
All Rights Reserved

Reference Manual Control Panel

NG4 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.17 $ $Date: 1995/07/26 23:30:10 $