How can I use multiple zones for one defaultm?
조회 수: 2 (최근 30일)
이전 댓글 표시
Is there a way to define a single defaultm with several zones (for instance 6 adjacent UTM zones - say 22E, 22F, 23E, 23F, 24E and 24F)?
Some context:
I am working with a project where I need to go through different UTM zones. I am using the Mapping Toolbox for that.
As my original coordinates are [Lon Lat] I must first transform the coordinate to coordinates in the relevant UTM zone. I do this using the following code (for instance Lat = -50 and Lon = -40 - I picked these randomly just for the context):
z1 = utmzone([Lat Lon]); % choose zone according to the GPS position
[ellipsoid, estr]=utmgeoid(z1); % choose a geoid according to the zone
utmstruct = defaultm('utm'); % create a default UTM structure
utmstruct.zone = z1; % set the UTM zone in the UTM structure
utmstruct.geoid = ellipsoid; % set the ellipsoid in the UTM structure
utmstruct = defaultm(utmstruct); % set the new UTM structure as default (again?!)
[X, Y] = mfwdtran(utmstruct,Lat, Lon);
If I need to find Lat, Lon I then use:
[newLat, newLon] = minvtran(utmstruct, newX, newY);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!