Robinson map projection?

15 vues (au cours des 30 derniers jours)
Ali Almakhmari
Ali Almakhmari le 3 Août 2022
I have a map of Earth in the cylindrical projection that has all the planet's data (longitude: -180 to 180 degrees, latitude: -90 degrees to 90 degrees), similar to the one attached. Is there a way in MATLAB to change the projection of this map into the Robinson projection? Any advice is appreciated

Réponse acceptée

Divit le 7 Sep 2023
Hello Ali,
Ensure that you have the “Mapping Toolbox” installed in MATLAB. It provides built-in support for various map projections, including the Robinson projection. You can check whether you have the Mapping Toolbox installed or not using the “ver mapping_toolbox” command.
You can achieve the desired Robinson Projection using a MATLAB script. In the script, you can create a new figure with a Robinson projection using the “axesm” function and specify the latitude and longitude limits. Then, create a geospatial reference object to associate the map image with the Robinson projection. Finally, use “geoshow” to display the georeferenced image in the Robinson projection.
Feel free to refer to the provided code below as an example:
% Load and display the map image (assuming it's in equirectangular projection)
mapImage = imread('600px-Cylindrical_equal-area_projection_SW.jpg');
% Display Original Image
title('Equirectangular Projection');
% Create a new figure with a Robinson projection
ax = axesm('robinson', 'FFaceColor', 'none', 'FEdgeColor', 'k');
% Define the latitude and longitude limits for the Robinson projection
latlim = [-90 90];
lonlim = [-180 180];
% Rotate the image by 180 degrees
mapImage = fliplr(rot90(mapImage, 2));
% Create a geospatial reference object for the Robinson projection
georef = georefcells(latlim, lonlim, size(mapImage));
% Display the georeferenced image in the Robinson projection
geoshow(ax, mapImage, georef);
title('Robinson Projection');
Output Image:
To know more you can refer to the following documentation links:

Plus de réponses (0)




Community Treasure Hunt

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

Start Hunting!

Translated by