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!