www.gusucode.com > map 案例源码 matlab代码程序 > map/ConstructMapReferencingObjectWithInterpOfCellsExample.m
%% Construct Referencing Object with Raster Interpration of Cells % %% % Define latitude and longitude limits and dimensions of the image. The % image follows the popular convention in which world _x_ coordinates % increase from column to column and world _y_ coordinates decrease from % row to row. % Copyright 2015 The MathWorks, Inc. xWorldLimits = [207000 208000]; yWorldLimits = [912500 913000]; rasterSize = [1000 2000] %% % Create the referencing object specifying the raster size. R = maprefcells(xWorldLimits,yWorldLimits,rasterSize,... 'ColumnsStartFrom','north') %% % Obtain the same result by specifying the cell extents. For this example, % the pixels are 1/2 meter square, referenced to a planar map coordinate % system (the "world" system). extent = 1/2; R = maprefcells(xWorldLimits,yWorldLimits,extent,extent,... 'ColumnsStartFrom','north')