www.gusucode.com > map 案例源码 matlab代码程序 > map/CombiningRasterDataAndVectorDataOnTheSameMapExample.m

    %% Combining Raster Data and Vector Data on the Same Map
% This example shows how to combine raster data and vector data on the
% same map.
%%
% Load the coastline vector data.
load coastlines
%%
% Load the topo raster data set.
load topo
%%
% Create a raster referencing object associated with the topo data set.
topoR = georefcells(topolatlim,topolonlim,size(topo))
%%
% Create a map axes, using |axesm|, specifying the Robinson projection.
% Then plot the raster data on the axes with an appropriate color map.
axesm robinson;
geoshow(topo,topoR,'DisplayType','texturemap')
demcmap(topo)
%%
% Plot the coastline data in red on top of the terrain map. You can use
% |geoshow| to display both raster and vector data.
geoshow(coastlat,coastlon,'Color','r')