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.

조회 수: 19 (최근 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