problem inserting some site coordinates on a map created by geoshow

2 ビュー (過去 30 日間)
Sharare
Sharare 2019 年 9 月 13 日
回答済み: Jalaj Gambhir 2019 年 9 月 17 日
Hi,
I simply used 'geoshow' to have a map with lat and lon:
geoshow(lat,lon,Z,'DisplayType','surface');
the lat, lon and z are coming from a DEM file.
now I want to mark some locations on this map like:
geoshow(HEAD(:,1), HEAD(:,2),'displaytype','point','Marker', 'o')
and the HEAD is lat and lon for 76 sites which obviously are located in the first map.
I can have both in separate maps but I can not plot them in one. Can anyone help me?

回答 (1 件)

Jalaj Gambhir
Jalaj Gambhir 2019 年 9 月 17 日
Hi,
Assuming the variables ‘lat’,’lon’,’Z’ are correctly initialized, you can plot the markers on the surface map, using figure handle through gca.
figure;
load('korea');
worldmap(map, refvec);
geoshow(gca,map,refvec,'DisplayType','surface');
load coastlines;
geoshow(gca,coastlat,coastlon,'displaytype','point','Marker', 'o');

Community Treasure Hunt

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

Start Hunting!

Translated by