Mapping Toolbox    
neworig

Transform regular matrix map to new coordinate system based on a new origin

Syntax

Description

This command will transform a regular matrix map into a new matrix in an altered coordinate system. An analytical use of the new matrix can be realized in conjunction with the newpole command. If a selected point is made the north pole of the new system, then when a new matrix is created with neworig, each row of the new matrix is constant distance from the selected point, and each column is constant azimuth from that point.

[map,lat,lon] = neworig(map0,maplegend,origin) returns the data in the original regular matrix map, map0, with its three-element map legend vector maplegend, reallocated to the cells of the new (same-sized) matrix map. This transformation is governed by the input origin. This is a three- (or two-) element vector of the form [latitude longitude orientation]. The latitude and longitude are the coordinates of the point in the original system that is the center of the output system. The orientation is the azimuth from the new origin point to the original North Pole in the new system. If origin has only two elements, the orientation is assumed to be 0°. This origin vector might be the output of putpole or newpole. The outputs lat and lon are matrices the size of map which give a cell-by-cell registration of map to the coordinates of the original (map0) system in latitude and longitude, respectively.

[map,lat,lon] = neworig(map0,maplegend,origin,direction) allows the specification of the operation. If the string direction is 'forward' (the default), the transformation occurs as described above. If the direction is 'inverse', then the output map is the original system from which a transformed matrix map0 was derived, via the input origin. Note that if the matrix map1 is transformed forward to map2, and map2 is transformed inversely to map3, map3 will look very much like map1, but the two matrices will not be identical. This is because neworig is in fact projecting the values of the cells twice, rather than undoing the first transformation, and matrix data has granularity to it.

[map,lat,lon] = neworig(map0,maplegend,origin,direction,units) allows the specification of the angular units of the origin vector, where units is any valid angle units string. The default is 'degrees'.

Limitations

neworig only support matrix maps that cover the entire globe.

Examples

This is the topo map transformed to put Sri Lanka at the North Pole:

See Also
newpole
Select point to place at North Pole
org2pol
Pole of transformed coordinate system
putpole
Origin of transformed coordinate system
rotatem
Transform vector data to new coordinate system based on a new origin


  navigational track format newpole