How can I rotate the view of a geoplot?
39 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Arno Frauenfelder
el 3 de Jul. de 2020
Respondida: Vimal Rathod
el 9 de Jul. de 2020
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 comentarios
Respuesta aceptada
Vimal Rathod
el 9 de Jul. de 2020
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Geographic Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!