clear;clc;
%监测站位置读取
[lonlatg,nameg] = xlsread('F:\predict_pm\xls\bj.xlsx');
% 画图的界限
latlim = [38.2 42.2]; lonlim = [114 119];
% 确定大小范围
latli = [39.2 41.2]; lonli = [115 118];
% 找到界限内的土地
% landcover satellite卫星图象 streets街道
[A,RA] = readBasemapImage('streets',latlim,lonlim,25);% landcover satellite卫星图象
% 从参考对象中提取底图图像的Web Mercator坐标。然后,将坐标取消投影到地理坐标。
[xGrid,yGrid] = worldGrid(RA);
[latGrid,lonGrid] = projinv(RA.ProjectedCRS,xGrid,yGrid);
figure
set(gcf,'unit','centimeters','position',[3 3 8.4 6]);
% 画DEM图
geoshow(latGrid,lonGrid,A)
ylim(latli);
xlim(lonli);
hold on
% 绘制北京省界线
readl=shaperead('F:\BJSHP\Beijing.shp','UseGeoCoords',true);
lon = readl.Lon;lat = readl.Lat;
geoshow(lat,lon,'Color','k','linewidth',0.8);
hold on;
set(gca,'unit','centimeters','position',[1 1 7.1 4.7],'Ytick',40:41,...
'Xtick',115.5:117.5,'Box','off');%
xlabel('Longitude')
ylabel('Latitude');
% 空气监测站位置
for I = 1:size(nameg,1)
% 2 12 18 24是验证的监测站
if I==2||I==12||I==18||I==24
colo = 'r';
else
colo = 'b';
end
scatter(lonlatg(I,1),lonlatg(I,2),10,'o','filled',colo)
end
03-17
492