www.gusucode.com > map 案例源码 matlab代码程序 > map/ConstructReferencingObjectForGridExample.m
%% Construct Referencing Object for Grid % %% % Define latitude and longitude limits and dimension of a grid. The example % uses postings separated by 1/2 meter, referenced to a planar map % coordinate system (the "world" system). % Copyright 2015 The MathWorks, Inc. xWorldLimits = [207000 208000]; yWorldLimits = [912500 913000]; rasterSize = [1001 2001] %% % Create the referencing object specifying the raster size. R = maprefpostings(xWorldLimits,yWorldLimits,rasterSize) %% % Obtain the same result by specifying the sample spacing. spacing = 1/2; R = maprefpostings(xWorldLimits,yWorldLimits,spacing,spacing)