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.

6 ビュー (過去 30 日間)
世园 李
世园 李 2023 年 9 月 10 日
コメント済み: Shiyuan 2023 年 12 月 23 日
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 Center および File ExchangeGeographic Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by