Plotting Climate Division by Latitude and Longitude on Map
2 views (last 30 days)
Show older comments
Michaela Wood
on 12 Jan 2021
Commented: Michaela Wood
on 12 Jan 2021
Hello. I have a map of the state of Nebraska I plotted by using the following:
figure(1)
usamap('Nebraska')
nebraskahi = shaperead('usastatehi', 'UseGeoCoords', true,...
'Selector',{@(name) strcmpi(name,'Nebraska'), 'Name'});
geoshow(nebraskahi, 'FaceColor', [0.3 1.0, 0.675])
mlabel off; plabel off; gridm off
hold on
and on that map I want to outline one of the climate divisions in Nebraska. I have the longitude and latitude of that climate division boundary here
lat =[43 43 43 42.8359 42.8305 42.6631 42.1351 42.1123 42.0358 42.032 41.7492 41.7455 41.3734 41.3734 41.3895 41 41 41 41 42.2557 42.2557 43];
lon=[-104.03 -102.0276 -102.0276 -102.035 -101.9827 -101.9971 -102.0106 -101.9682 -101.9652 -102.0229 -102.0172 -101.9539 -101.9553 -101.9553 -102.0146 -102.0302 -102.0302 -104.02 -104.02 -104.0263 -104.0263 -104.03];
but can't figure out the right way to plot this onto a map. Anything helps, thank you in advance.
Accepted Answer
Cris LaPierre
on 12 Jan 2021
Specifying the axes in geoshow appears to work for me.
ax = usamap('Nebraska');
nebraskahi = shaperead('usastatehi', 'UseGeoCoords', true,...
'Selector',{@(name) strcmpi(name,'Nebraska'), 'Name'});
geoshow(nebraskahi, 'FaceColor', [0.3 1.0, 0.675])
mlabel off; plabel off; gridm off
lat =[43 43 43 42.8359 42.8305 42.6631 42.1351 42.1123 42.0358 42.032 41.7492 41.7455 41.3734 41.3734 41.3895 41 41 41 41 42.2557 42.2557 43];
lon=[-104.03 -102.0276 -102.0276 -102.035 -101.9827 -101.9971 -102.0106 -101.9682 -101.9652 -102.0229 -102.0172 -101.9539 -101.9553 -101.9553 -102.0146 -102.0302 -102.0302 -104.02 -104.02 -104.0263 -104.0263 -104.03];
geoshow(ax,lat,lon)
More Answers (0)
See Also
Categories
Find more on Weather and Atmospheric Science in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!