- Use the “topo” Digital Elevation Model (DEM) provided by the “MATLAB Mapping Toolbox” to obtain a gridded elevation dataset.
- Obtain the “latitude” and “longitude” values using the “meshgrat” function.
- Create an axesm-based map for world region using “worldmap” function.
- Display map latitude and longitude data on the created axis using “geoshow” function.
displaying elevation profile using geoshow problem
9 次查看(过去 30 天)
显示 更早的评论
lat = [-20 -16] ;
lon = [174 180] ;
worldmap(latlim,lonlim);
load coastlines
geoshow(coastlat,coastlon,'DisplayType','texturemap')
hi, im trying to display elevation profile of lat,lon coordinates above using geoshow, however there is error in code im unsure how to properly use goeshow. Any help would be greatly appreciated
0 个评论
回答(1 个)
VINAYAK LUHA
2023-10-6
Hi JJ,
I understand that you want to display the elevation profile of a geographical region defined by latitude and longitude ranges using the “geoshow” function.
Follow the below pointers to display the elevation profile using “geoshow” function-
Refer to the following code snippet to display the elevation profile using “geoshow” function:
load topo
load coastlines
colormap parula
[lat,lon] = meshgrat(topo,topolegend);
latlim = [-20 -16] ;
lonlim = [174 180] ;
imagesc(flip(topo))
worldmap(latlim,lonlim);
geoshow(lat,lon,topo,'DisplayType','texturemap')
hold on
geoshow(coastlat,coastlon,'DisplayType','polygon')
colorbar
Refer to the following documentations for more details on the functions used in the code snippet:
Hope this helps in visualizing the elevation in a geographical region defined by a range of latitudes and longitudes.
Regards,
Vinayak Luha
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!