現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
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
15 ビュー (過去 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 日
So basically I don't have mapping toolbox How can it be done without toolbox
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.
Simran Sandhu
2018 年 9 月 1 日
Umm yeah even am thinking the same to update it. Thank You I'll try to do it
採用された回答
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!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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 (한국어)