Extract data given coordinates from a map

2 ビュー (過去 30 日間)
Alina
Alina 2015 年 3 月 12 日
コメント済み: GOKHAN CAMLIYURT 2021 年 7 月 20 日
Dear all
I just begin to work with Matlab. I have to extract data given coordinates(borders) from a map. I have the matrixes with LAT, LON and DATA. How can I indicate the borders of my area with given coordinates?
Or maybe it's easier to get data from a figure which I've already made with my coordinates.
I'd appreciate your help and time. Thank you in advance!

回答 (1 件)

Kostas
Kostas 2015 年 3 月 12 日
編集済み: Kostas 2015 年 3 月 12 日
I assume your data is a matrix of the form
data(lat,lon,time)
with dimension of the latitude, longitude and time. So you can just keep the borders of the lat and lon you want finding the indices. Eg if you need to keep the latitudes from 20 to 60 degress North, assuming that you have global latitude from -90 to 90 each 5 degrees:
lat = -90:5:90';
you just find the indices
id = (lat>=20&lat<=60);
data1 = data(id,:,:); % get the latitude dimensions you want and keep all the other dimension
Same approach cab be applied for longitude too
  1 件のコメント
GOKHAN CAMLIYURT
GOKHAN CAMLIYURT 2021 年 7 月 20 日
Dear Kostas,
I have below data and need to extract only a specific coneres given area lat long. My data is quite large area and hard to run matlab code.
SAmple data as below.
mmsi time lat long spd cog
440102290 20190901000000 129.109255 35.06983 200.2 2.223082085
440956000 20190901000000 129.0868667 35.07701667 355 0
538007311 20190901000000 129.1232417 35.03779833 177.1 3.863928385
265000000 20190901000030 129.0941417 35.07822167 237.7 0
354714000 20190901000030 129.094605 35.09598 167.2 0

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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by