How to add a map as background in MATLAB to the points i have already plotted. I am interested in mapping the Surat city region as background
29 次查看(过去 30 天)
显示 更早的评论
lat = [21.1658 21.1655 21.16672 21.15832 21.16441 21.15638 21.17459 21.17103 21.17166 21.14175 21.17098 21.17521 21.16423 21.17525 21.16205];
lon = [72.7939 72.7937 72.79333 72.75241 72.77744 72.77798 72.77342 72.78658 72.78956 72.75316 72.77758 72.80426 72.79398 72.78943 72.75631];
plot(lon, lat, '.b', 'MarkerSize', 15);
grid on
11 个评论
Simran Sandhu
2018-9-1
Or what are the ways to do it using mapping toolbox I can arrange a higher version of MATLAB
jonas
2018-9-1
编辑:jonas
2018-9-1
There are other options on fileexchange as well. But honestly I dont know what works with release 2013. See here for example
https://se.mathworks.com/matlabcentral/fileexchange/27627-zoharby-plot_google_map
https://se.mathworks.com/matlabcentral/fileexchange/50390-borders
Simran Sandhu
2018-9-1
This is something I got,,but they are overlapping,just the way I have India map I am willing to have for a city like Surat
jonas
2018-9-1
编辑:jonas
2018-9-1
I assueme you used the borders function, which is for plotting land and sea borders, not single cities. Did you try the m_map package that KSSV linked? I have not used it myself, but I've read that it has a m_shaperead() function, which is exactly what you need. You just have to find a shapefile (.shp) online.
采纳的回答
KSSV
2018-9-1
YOu have many ways to achieve that. I will list few:
1. Go to google maps, download the required domain you want and plot.
2. Go to google images, download the required images, fix the limits and plot.
3. Get surat shape file from google and plot.
24 个评论
Simran Sandhu
2018-9-1
编辑:Simran Sandhu
2018-9-1
no luck with it..i downloaded the shape file, but giving errors. Please help me with it The help would be appreciated
Simran Sandhu
2018-9-1
This is something I got,,but they are overlapping,just the way I have India map I am willing to have for a city like Surat
Simran Sandhu
2018-9-2
I downloaded the surat city map,,but while plotting the points they are not in the perfect location,,is there any way to sort that out?
Also I used borders syntax but still that doesnt have the surat city or gujarat any of it
KSSV
2018-9-2
If you use jpg, png ..you must know the exact (lat, Lon) ..do you know the limits? Go to Google maps and try to get the limits.
Simran Sandhu
2018-9-2
Yes I do have the exact lat longs, got the lats and longs from google maps itself
Simran Sandhu
2018-9-2
clc; clear all; close all; a=imread('surat.jpg'); imresize(a,20); imshow(a) hold on plot(21.1658,72.7939 , 'r*', 'LineWidth', 2, 'MarkerSize', 15); hold on; plot(21.1620,72.7563, 'b*', 'LineWidth', 2, 'MarkerSize', 15); hold on;
Simran Sandhu
2018-9-2
I know the latitude and longitude of surat city 21.1702° N, 72.8311° E but ain't aware of the limits. Also am not an expert to MATLAB so thank you for all the support you are giving
Simran Sandhu
2018-9-2
编辑:KSSV
2018-9-3
c=imread('surat.jpg');
image([ 21.1591425 21.1702401 ],[ 72.6822085 72.8310607 ], c);
hold on;
plot(21.1658,72.7939 , 'r*', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
plot(21.1655,72.7937, 'b*', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
plot(21.166718,72.7933298, 'c*', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
plot(21.1583221,72.7524079, 'k*', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
plot(21.16441411,72.7774434, 'g*', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
plot(21.1563791,72.7779792, 'm*', 'LineWidth', 2, 'MarkerSize', 15);
hold on;
KSSV
2018-9-3
When you plot the image....you need to remove the grey borders....when you use the image function....it will consider the grey borders also.....you need to select the image properly.
Simran Sandhu
2018-9-3
编辑:KSSV
2018-9-3
lat = [21.1658 21.1655 21.16672 21.15832 21.16441 21.15638 21.17459 21.17103 21.17166 21.14175 21.17098 21.17521 21.16423 21.17525 21.16205];
lon = [72.7939 72.7937 72.79333 72.75241 72.77744 72.77798 72.77342 72.78658 72.78956 72.75316 72.77758 72.80426 72.79398 72.78943 72.75631];
plot(lon, lat, '.b', 'MarkerSize', 15);
grid on
plot_google_map('MapScale', 1)
Simran Sandhu
2018-9-3
plot_google_map('MapScale', 1) I used this function so it gave the background map of surat itself
Simran Sandhu
2018-9-8
This is the map i got,,now if i wish to create a coverage are that is show the are covered by one point how to do it?
jonas
2018-9-8
You should accept the answer when the original question is resolved. Also, what do you mean by coverage?
Simran Sandhu
2018-9-8
yes sorry.new to this all that is why.. coverage as in BTS coverage.. the area covered by BTS for providing services
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)