neworig
Orient regular data grid to oblique aspect
Syntax
[Z,lat,lon] = neworig(Z0,R,origin)
[Z,lat,lon]
= neworig(Z0,R,origin,'forward')
[Z,lat,lon] = neworig(Z0,R,origin,'inverse')
Description
[Z,lat,lon] = neworig(Z0,R,origin)
and
[Z,lat,lon]
= neworig(Z0,R,origin,'forward')
will transform regular
data grid Z0
into an oblique aspect, while preserving the matrix storage
format. In other words, the oblique map origin is not necessarily at (0,0) in the Greenwich
coordinate frame. This allows operations to be performed on the matrix representing the
oblique map. For example, azimuthal calculations for a point in a data grid become row and
column operations if the data grid is transformed so that the north pole of the oblique map
represents the desired point on the globe. Specify R
as a GeographicCellsReference
or GeographicPostingsReference
object. The RasterSize
property
of R
must be consistent with size(Z)
.
[Z,lat,lon] = neworig(Z0,R,origin,'inverse')
transforms
the regular data grid from the oblique frame to the Greenwich coordinate
frame.
The neworig
function transforms a regular
data grid into a new matrix in an altered coordinate system. An analytical
use of the new matrix can be realized in conjunction with the newpole
function.
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 a constant distance from the selected
point, and each column is a constant azimuth from that point.
Limitations
neworig
only supports data grids that cover
the entire globe.
Examples
Load elevation raster data and a geographic cells reference object. Then, transform the map so that Sri Lanka is at the North Pole.
load topo60c origin = newpole(7,80); Z = neworig(topo60c,topo60cR,origin); axesm miller gridm on lat = linspace(-90,90,90); lon = linspace(-180,180,180); surfm(lat,lon,Z) demcmap(topo60c) tightmap