When using "geoplot" to create a map, how can I change the map projection to Lambert? It seems that "m_proj" cannot be used together with geoplot.

5 次查看(过去 30 天)
minlat = 25;
minlon = 65;
maxlat = 45;
maxlon = 108;
m_proj('lambert','lon',[64 108],'lat',[21 48]);
geoplot([minlat maxlat],[minlon maxlon],'-*');
geodensityplot(allLat, allLon, weights*10^8, 'FaceColor', 'interp');
geobasemap none
geolimits([25 45],[65 105]);
%This results in two separate plots. I would like the geoplot to be displayed in Lambert projection.

回答(1 个)

VINAYAK LUHA
VINAYAK LUHA 2023-9-20
Hi 世园 李 ,
It is my understanding that you wish to change the projection type as Lambert for the geoplot function.
The geoplotfunction plots data only in geographic coordinates, hence current axes need to be either geographic or map axes, since current axes set by m_proj are neither geographic nor map axes, it throws an error.
Here’s a workaround to set the projection method as lambert
  • Create a projected CRS object by specifying an EPSG code,5325 for “Lambert Conic Conformal.
p=projcrs(5325);
  • Create a newmap with p as the coordinate reference system (CRS).
newmap(p);
  • Geopmap plots on this map axes follows “Lambert Conic Conformal method”.
Explore the following documentations for more details-
Regards,
Vinayak Luha

类别

Help CenterFile Exchange 中查找有关 Geographic Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by