Hi I have a doubt in changing map projection

1 回表示 (過去 30 日間)
Koushikh K
Koushikh K 2019 年 5 月 29 日
コメント済み: Koushikh K 2019 年 6 月 15 日
I have matrices of latitude and longitude data.The latitude and longitude data are projected according to ortho map projection. I want to convert these matrices into a linear ID array of latitude and longitude.
I am not sure how to do it.
Is there a way to do it in Matlab?
Thanks in advance

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 5 月 29 日
Do something like this solve your problem:
Lat1D = LAT2D(:);
Long1D = LONG2D(:);
If that gives you the values in a "wrong" order you can just transpose the 2-D matrices first.
HTH
  3 件のコメント
Bjorn Gustavsson
Bjorn Gustavsson 2019 年 5 月 29 日
Do you want to extract data values at some kind of regular grid in Lat-Long? I'll make another guess:
load data2D_projected % assuming something for variable-names for you
load Lat_projected
load Long_projected
Long = 12:0.1:41; % and a very arbitrary range for your longitudes
Lat = 8:0.01:11;
[Long,Lat] = meshgrid(Long,Lat);
F = scatteredInterpolant(Long_projected(:),Lat_projected(:),dat2D_projected(:));
Data_reg_LongLat = F(Long,Lat);
If this is not what you want a better approach to get what you want is a more explicit and clear description of what you want...
HTH
Koushikh K
Koushikh K 2019 年 6 月 15 日
Hey sorry for the late reply I was able to solve my problem using the function inpolygon Specifying the latitude and longitude range of my interest I was able to extract the data values for that region
Thanks for ur reply

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by