Effacer les filtres
Effacer les filtres

Plotting Points on Map with Longitude and Latitude

17 vues (au cours des 30 derniers jours)
Claire Hollow
Claire Hollow le 9 Juin 2020
Commenté : Claire Hollow le 10 Juin 2020
Hello. I feel like this should be easy but I can't get it to work and I'm looking for some help. I have the latitude and longitude points for several staions throughout the state of Nebraska. I am trying to make a map of Nebraska and just have a dot at each station location. I already have the plot for the map of Nebraska given this
figure
usamap('Nebraska')
nebraskahi = shaperead('usastatehi', 'UseGeoCoords', true,...
'Selector',{@(name) strcmpi(name,'Nebraska'), 'Name'});
geoshow(nebraskahi, 'FaceColor', [0.3 1.0, 0.675])
I just need help adding a point to this. For instance, adding a point at the latitude 40.9394 and longitude -100.151. Thank you for your help!

Réponse acceptée

dpb
dpb le 10 Juin 2020
I don't have the Mapping TB so can't test, but looks like just
hold on
lat= 40.9394;
lon=-100.151;
plotm(lat,lon,'r*')
would put a red asterisk at desired location.
plotm draws the latitude, longitude vectors given similar to plot for 2D graphics.
If you don't use a line as part of the linestyle argument, then you can just put the list of places in a vector pair or 2D array.

Plus de réponses (0)

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by