Plot lat lon on a map with state boundaries

2 ビュー (過去 30 日間)
ANKUR KUMAR
ANKUR KUMAR 2017 年 9 月 5 日
編集済み: Ka Mirul 2018 年 1 月 27 日
I have 4 sets of lat-long points. So, how can i just point out these lat-long on the India map. I have tried with geoshow but it doesn't give give the results as what i expected. It makes a line by combining all points.

回答 (2 件)

Cam Salzberger
Cam Salzberger 2017 年 9 月 5 日
Hello Ankur,
The 'DisplayType' name-value pair input to geoshow will allow you to specify that you just want points, rather than a line between the points.
geoshow(lat,lon,'DisplayType','point')
You can also use 'SymbolSpec' if you want to get specific about how the points are displayed.
-Cam
  2 件のコメント
ANKUR KUMAR
ANKUR KUMAR 2017 年 9 月 5 日
I got the plot but how to put the country and state boundaries at the back?
Cam Salzberger
Cam Salzberger 2017 年 9 月 6 日
I do not believe that MATLAB ships with example data that contains political boundaries for India. If you just want to get an idea of it, you can use the built-in coastlines data:
worldmap('World')
load coastlines
plotm(coastlat,coastlon)
lat = [12.9716 17.3850];
lon = [77.5946 78.4867];
geoshow(lat,lon,'DisplayType','point')
Otherwise, I'd recommend checking out the documentation's suggestions for finding vector data. Once you have the data, you can use a similar method as above to display it.
If you are creating you map axes in a different way, and are seeing the boundary data disappear when you plot your points, try using:
hold on
before plotting the points.
-Cam

サインインしてコメントする。


Ka Mirul
Ka Mirul 2018 年 1 月 27 日
編集済み: Ka Mirul 2018 年 1 月 27 日

This video may help you : https://youtu.be/u4UPmUPInAY Good luck.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by