Referencing matrix to map raster reference object
R = refmatToMapRasterReference(refmat,rasterSize)
R = refmatToMapRasterReference(___,rasterInterpretation)
R = refmatToMapRasterReference(___,func_name, var_name, arg_pos)
R = refmatToMapRasterReference(Rin,rasterSize, ___)
constructs
a map raster reference object, R
= refmatToMapRasterReference(refmat
,rasterSize
)R
, from a referencing
matrix, refmat
, and a size vector, rasterSize
.
uses
the R
= refmatToMapRasterReference(___,rasterInterpretation
)rasterInterpretation
input to determine which
type of map raster reference object to construct. The rasterInterpretation
input
indicates basic geometric nature of the raster, and can equal either 'cells'
or 'postings'
.
uses
up to three optional arguments to provide additional information.
This information is used to construct error messages if either the R
= refmatToMapRasterReference(___,func_name
, var_name
, arg_pos
)refmat
or rasterSize
inputs
turn out to be invalid. Thus, you can use refmatToMapRasterReference
for
both validating and converting a referencing matrix. The optional
inputs work just like
their counterparts in the function validateattributes
.
verifies
that R
= refmatToMapRasterReference(Rin
,rasterSize
, ___)Rin.RasterSize
is consistent with rasterSize
,
then copies Rin
to R
.
|
Referencing matrix |
|
Size vector R = refmatToMapRasterReference(refmat, size(RGB)) where |
|
Basic geometric nature of the raster, specified as either |
|
Name used in the formatted error message to identify the function checking the input, specified as a character vector. |
|
Name used in the formatted error message to identify the referencing matrix, specified as a character vector. |
|
Positive integer that indicates the position of the referencing
matrix checked in the function argument list. |
|
Map raster reference object. |
|
Map raster reference object. |
Convert a referencing matrix manually versus using the maprasterref
function.
% Create a sample referencing matrix for a 2000-by-2000 % orthoimage referenced to the Massachusetts State % Plane Mainland coordinate system. refmat = [0 -1; 1 0; 208999.5 913000.5]; % Import the corresponding TIFF image and use its size to % help convert the referencing matrix to a referencing object. [X, cmap] = imread('concord_ortho_e.tif'); R = refmatToMapRasterReference(refmat, size(X)); % Obtain the map limits. xLimWorld = R.XWorldLimits; yLimWorld = R.YWorldLimits; % Construct a referencing object directly, for comparison. R2 = maprasterref('RasterSize',size(X),'ColumnsStartFrom','north', ... 'XLimWorld',xLimWorld,'YLimWorld',yLimWorld);