【问题标题】:MATLAB Mapping Toolbox Default Map ProjectionMATLAB Mapping Toolbox 默认地图投影
【发布时间】:2017-06-30 14:30:15
【问题描述】:

我正在使用worldmap 创建地图,并设置了经纬度限制。 MATLAB 使用什么投影来创建图形? Mathworks 只是说它会自动选择一个“合理的”投影。

这是我正在使用的代码:

        figure('visible','off');

        %%% Set the map boundaries
        hi_lat=55;
        lo_lat=24.5;
        hi_lon=-54.0 ;
        lo_lon=-128.0;

        %%% Plot
        worldmap ([lo_lat hi_lat], [lo_lon hi_lon]) % lat and lon bounds of your plot
        geoshow('landareas.shp','FaceColor', 'none', 'EdgeColor', [0 0 0])
        framem off; gridm off; mlabel off; plabel off
        hold on
        states = shaperead('usastatelo', 'UseGeoCoords', true,...
            'Selector',...
            {@(name) ~any(strcmp(name,{'Alaska','Hawaii'})), 'Name'});
        geoshow(states,'FaceColor', 'none', 'EdgeColor', [0 0 0])

【问题讨论】:

    标签: matlab map-projections


    【解决方案1】:

    设置worldmap等于一个变量,然后尝试getm

    h = worldmap ([lo_lat hi_lat], [lo_lon hi_lon]) % lat and lon bounds of your plot
    geoshow('landareas.shp','FaceColor', 'none', 'EdgeColor', [0 0 0])
    framem off; gridm off; mlabel off; plabel off
    hold on
    states = shaperead('usastatelo', 'UseGeoCoords', true,...
            'Selector',...
            {@(name) ~any(strcmp(name,{'Alaska','Hawaii'})), 'Name'});
        geoshow(states,'FaceColor', 'none', 'EdgeColor', [0 0 0])
    
    getm(h,'MapProjection')
    

    【讨论】:

      猜你喜欢
      • 2012-06-08
      • 1970-01-01
      • 1970-01-01
      • 2012-07-16
      • 2012-08-14
      • 1970-01-01
      • 2013-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多