Mapping Toolbox | ![]() ![]() |
Transform projected Cartesian data to an unprojected Greenwich coordinate system
Syntax
[lat,lon] = minvtran(x,y) [lat,lon,alt] = minvtran(x,y,z) [lat,lon,alt] = minvtran(x,y,z,object,struct) [...] = minvtran(mstruct,...)
Description
[lat,lon] = minvtran(x,y) transforms projected Cartesian data to an unprojected Greenwich coordinate frame using the map projection defined for the current axes. No data clips or trims are removed with this calling form.
[lat,lon,alt] = minvtran(x,y,z) transforms the three-dimensional data to the unprojected Greenwich coordinate frame using the map projection defined for the current axes. If z = []
or z
is omitted, the default z = 0
is used.
[lat,lon,alt] = minvtran(x,y,z,object
,struct) removes all clips and trims from the input data. Allowable object
strings are 'surface'
, 'line'
, 'patch'
, 'light'
, 'text'
, and 'none'
. 'none'
will result in no removal of any clips or trims of the input data. The output struct
is a structure containing information about the clips and trims associated with the transformed object, and is created by the function mfwdtran
.
[...] = minvtran(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
Before using any transformation commands, it is necessary to create a map projection structure. You can do this with axesm
or the defaultm
command:
The following latitude and longitude data for the District of Columbia is obtained from the usalo
workspace:
load usalo lat = state(51).lat; lon = state(51).long; [lat lon] ans = 38.9000 -77.0700 38.9000 -77.0500 38.9000 -77.0700 38.8700 -77.0200 38.8000 -77.0200 38.7800 -77.0300 38.9000 -76.9000 39.0000 -77.0300 38.9500 -77.1200 38.9000 -77.0700
This data can be projected into Cartesian coordinates of the Mercator projection using the mfwdtran
command:
[x,y] = mfwdtran(mstruct,lat,lon); [x y] ans = -0.0004 0.0002 -0.0001 0.0002 -0.0004 0.0002 0.0003 -0.0003 0.0003 -0.0016 0.0001 -0.0019 0.0019 0.0002 0.0001 0.0019 -0.0011 0.0010 -0.0004 0.0002
To transform the projected x-y data back into the unprojected Greenwich frame, use the minvtran
command:
[lat2,lon2] = minvtran(mstruct,x,y); [lat2 lon2] ans = 38.9000 -77.0700 38.9000 -77.0500 38.9000 -77.0700 38.8700 -77.0200 38.8000 -77.0200 38.7800 -77.0300 38.9000 -76.9000 39.0000 -77.0300 38.9500 -77.1200 38.9000 -77.0700
See Also
axesm |
Map axes definition and property setting |
defaultm |
Initialize a default map data structure |
gcm |
Get current map data structure |
mfwdtran |
Map forward transformation |
vfwdtran |
Vector forward transformation |
vinvtran |
Vector inverse transformation |
![]() | minaxis | mlabel | ![]() |