- defaultm - https://www.mathworks.com/help/map/ref/defaultm.html#mw_011abd96-70d8-47c7-9716-a528f2d553cc
- Summary and Guide to Projections - https://www.mathworks.com/help/map/summary-and-guide-to-projections.html?searchHighlight=universal%20polar%20stereographic&s_tid=srchtitle_support_results_4_universal%20polar%20stereographic
Latitude, Longitude (degrees) to UTM and UPS projections
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I need a function to convert latitude, longitude to UTM and UPS systems and convert them back to latitude and logitude. Please let me know if someone has developed it already. :)
0 commentaires
Réponses (1)
ag
le 6 Nov 2024 à 10:10
Hi SK,
To convert latitude and longitude to the UTM or UPS coordinate system, you can utilize the Mapping Toolbox in MATLAB.
Below is an example code that demonstrates this process:
% Create a map projection structure for a UPS/UTM projection
mstruct = defaultm("ups");
% Specify map limits and a reference ellipsoid for the map projection structure.
% Populate additional fields of the structure based on the map limits using the defaultm function again.
mstruct.maplonlimit = [-150 -30];
mstruct.geoid = referenceEllipsoid("grs80", "kilometers");
mstruct = defaultm(mstruct);
% Load coastline data and trim it to the specified map limits.
% Project the latitude and longitude coordinates using the projfwd function and the map projection structure.
load coastlines
[lat, lon] = maptriml(coastlat, coastlon, mstruct.maplatlimit, mstruct.maplonlimit);
[x, y] = projfwd(mstruct, lat, lon);
% Display the projected coordinates on a Cartesian plot.
figure
plot(x, y)
axis equal
For more details, please refer to the following MathWorks documentation:
Hope this helps!
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!