How can I rotate the view of a geoplot?
조회 수: 38 (최근 30일)
이전 댓글 표시
Hi
I would like to plot a flight path on a map and rotate the view on the map so that the latest heading is pointing towards the top (or a simpler formulation: I would like to rotate the view of a geoplot). However, it seems like I cannot rotate the view of the geoplot using e.g. view() or 'Rotate' tool.
The simple code I am using as an example is below.
Is there a way to rotate the view of the plot I am doing below? Or is there another way to plot on a map and then rotate?
Thanks in advance.
Kind regards,
Arno
name = 'opentopomap';
url = 'a.tile.opentopomap.org';
copyright = char(uint8(169));
attribution = [ ...
"map data: " + copyright + "OpenStreetMap contributors,SRTM", ...
"map style: " + copyright + "OpenTopoMap (CC-BY-SA)"];
displayName = 'Open Topo Map';
addCustomBasemap(name,url,'Attribution',attribution, ...
'DisplayName',displayName)
posX = 9.95;
posY = 46.38;
pathX = [9.87 9.92 9.95 posX];
pathY = [46.27 46.3 46.35 posY];
gx = geoaxes;
geoplot(posY,posX,'*r',pathY,pathX,'-b')
geobasemap(name)
geolimits([posY-0.15 posY+0.15],[posX-0.15 posX+0.15])
% view([90 90])
댓글 수: 0
채택된 답변
Vimal Rathod
2020년 7월 9일
Hi,
The geoplot function is designed in such a way that it doesn't allow rotation of the plot. The rotation is included in geoplot3 function. It is used with geoglobe which has the ability to rotate the globe and considering your use case of plotting flight path, geoplot3 would be useful as it also takes into account the altitude of the flight which would give you greater accuracy during plotting and you would also have proper visualization as you require.
Refer to the following links to know more about geoplot3 and geoglobe functions
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!