Latitude and Longitude Data to Universal Transverse Mercator (UTM)
조회 수: 37 (최근 30일)
이전 댓글 표시
Hi,
How can i convert this spreadsheet with xy gps coordinates (Latitude and Longitude) to Universal Transverse Mercator (UTM), in meters?
댓글 수: 0
채택된 답변
André Luiz Lourenço
2021년 4월 13일
편집: MathWorks Support Team
2022년 6월 6일
Update: Please see this doc page: https://www.mathworks.com/help/map/working-in-utm-without-a-map-axes.html
************************************
Matlab has his own functions to deal with it.
First you need to get the utm zone from the coordinates
p1 = [lat,lon];
z1 = utmzone(p1)
Then you must get the geoid of this zone and construct the projection structcture using the following functions
[ellipsoid,estr] = utmgeoid(z1);
utmstruct = defaultm('utm');
utmstruct.zone = z1;
utmstruct.geoid = ellipsoid;
utmstruct = defaultm(utmstruct);
Finally you use mfwdtran to convert coordinates
[x,y] = mfwdtran(utmstruct,lat,lon)
This explanation content was found in reference: https://www.mathworks.com/help/releases/R2020a/map/working-in-utm-without-a-map-axes.html
댓글 수: 3
Honey
2021년 11월 22일
Hello .
I have a problem with this code in zone part. I know that my lat and lon data is located in 40 zone of north hemisphere. But this code is showing me z1= 40S. what's the matter?
추가 답변 (1개)
KSSV
2016년 11월 18일
Load the data into matlab and use the following function to convert degrees to utm.
YOu can load data from excel to matlab using xlsread.
댓글 수: 2
KSSV
2016년 11월 18일
Lat = data_MOM(:,1) ; % is X latitude? check
Lon = data_MOM(:,2) ; % is Y longitude? Check
[x,y,utmzone]= wgs2utm(Lat,Lon) ;
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!