Alignment problems with vector data using mapping toolbox

Hi, I have the following code to display vector data on a map in MATLAB. *****************************************************************************
figure [LONG, LAT]=meshgrid(linspace(min(long),max(long)),linspace(min(lat),max(lat)));
F = TriScatteredInterp(long,lat,elevation);
qz = F(LONG,LAT);
axesm('MapProjection','eqaconic', 'MapParallels',[],... 'MapLatLimit',[47 61], 'MapLonLimit',[-125 -85])
axis off; framem; gridm; mlabel; plabel
geoshow('PrairiesBoundaries.shp', 'DisplayType','polygon','FaceColor','white', 'EdgeColor','none')
[cs,h]=contour(LONG,LAT,qz,'.k','LineWidth',1.3);
clabel(cs,h,'fontsize',12);
hcb = colorbar('horiz'); set(get(hcb,'Xlabel'),'String','elevation')_____
**************************************************************************
I can correctly read the 'PrairiesBoundaries.shp' shapefile from ESRI, display the rivers, lakes and land areas correctly. However, when I interpolate elevation as in the code and use 'contour', I face problems here. The contours fail to align within the bounding box. Instead, contours are displayed somewhere else. I do not know how to get around with geographic coordinates in this case. It is easy in arcgis to define geographic coordinate of each layer to be same as that of data frame.
Please help, if possible with an example. Asong.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Geographic Plots에 대해 자세히 알아보기

질문:

2013년 4월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by