limit elevation ETOPO1
4 views (last 30 days)
Show older comments
For a map with ETOPO, how to limit elevation [Z] such that the plotted marker and name are not covered by the map?
Right now, my marker and name is covered by the elevation. I tried editing [Z], a 1200 x 1950 double, which is madness, and I know this is not the way to alter the elevation. Not allowed to use any additional mapping toolbox.
% Creating figure
figure
% Construct map axes for region
worldmap australia
% Returning the map projection structure from the current map axes
mstruct = gcm;
% Defining limits for lat and long - adjusting map axis
latlim = mstruct.maplatlimit;
lonlim = mstruct.maplonlimit;
% Read ETOPO file within the specified lat and long limits
% "Z" is data grid, an array of elevations
% "refvec" is the three-element referencing vector
[Z, refvec] = etopo(etopoFile,2, latlim, lonlim);
% Plotting marker on map
plotm(-37.814, 144.96332, '.k','markersize',8)
% Naming on map
textm(-37.814, 144.96332,point name,'FontSize',12)
% Displaying map data, with extracted etopo value
geoshow(Z, refvec, 'DisplayType', 'surface');
% Color the map based on the terrain elevation data, Z.
demcmap(Z, 500);
0 Comments
Accepted Answer
Amy Haskins
on 11 Sep 2018
I would try changing the geoshow line to use 'DisplayType', 'texturemap' instead of 'surface' and moving this line before the call to plotm. This will create a 2D plot rather than a 3D surface and put your markers and text on top of it.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!