Mapping Toolbox    
mfwdtran

Transform unprojected Greenwich data to a projected Cartesian coordinate system

Syntax

Description

[x,y] = mfwdtran(lat,lon) transforms unprojected Greenwich data to the projected Cartesian coordinate frame using the map projection defined for the current axes. No clipping or trimming of data is performed with this calling form.

[x,y,z] = mfwdtran(lat,lon,alt) transforms the three-dimensional data to the projected Cartesian coordinate frame using the map projection defined for the current axes. If alt = [] or alt is omitted, the default alt = 0 is used.

[x,y,z,struct] = mfwdtran(lat,lon,alt,object) clips and trims the data during the transformation process. Allowable object strings are 'surface', 'line', 'patch', 'light', 'text', and 'none'. 'none' will result in no clipping or trimming of the input data. The output struct is a structure containing information about the clips and trims associated with the transformed object. This structure is also found in the displayed object's UserData property.

[...] = mfwdtran(mstruct,...) requires a valid map projection structure as the first argument. This structure is used to define the map projection calculations performed. No map axes need be displayed when using this
calling form.

Examples

The following latitude and longitude data for the District of Columbia is obtained from the usalo workspace:

Before projecting the data, it is necessary to define projection parameters. This can be done with the axesm command, or with the defaultm command:

Now that the projection parameters have been set, transform the District of Columbia data into the Cartesian frame using the Mercator projection:

See Also
defaultm
Initialize a default map data structure
gcm
Get current map data structure
minvtran
Map inverse transformation
vfwdtran
Vector forward transformation
vinvtran
Vector inverse transformation


  meshm minaxis