Convert UTM to lat lon

17 ビュー (過去 30 日間)
Louise Wilson
Louise Wilson 2021 年 11 月 25 日
編集済み: Louise Wilson 2021 年 11 月 27 日
I have a 290x480x90 array where the x and y are coordinates in UTM. I'd like to convert them to degrees minutes seconds and I'd normally use the function utm2deg from the file exchange, but this requires the lat and lon arrays to be of equal length. Is there another solution? Thanks

回答 (1 件)

Rafael Palacios
Rafael Palacios 2021 年 11 月 26 日
I don't understand which column in your 3D array contains X coordinates and which one contains Y coordinates.
It sill be about saying something like:
X=[];
for i=1:90
X=[X; data(:,7,i)]; %7th column are X coordinates
end
RAFAEL
  2 件のコメント
Louise Wilson
Louise Wilson 2021 年 11 月 27 日
編集済み: Louise Wilson 2021 年 11 月 27 日
Hm, so is i the y coordinates or frequency?
My array is 91(freq)x489(lon)xlat(280). (I made a mistake in OP sorry)
I tried:
X=[];
for i=1:280
X=[X; vardata(:,7,i)]; %7th column are X coordinates
end
but this outputs a single 25480x1 array.
I am looking to get lat and lon?
Should I be repeating this for X and Y, and then running the utm2deg function?
Louise Wilson
Louise Wilson 2021 年 11 月 27 日
I tried to phrase the question more clearly here: https://au.mathworks.com/matlabcentral/answers/1596974-change-projection-of-netcdf-data-and-convert-from-utm-to-lat-lon

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by