www.gusucode.com > map 案例源码 matlab代码程序 > map/ExploringProjectionAspectExample.m
%% Control the Map Projection Aspect with an Orientation Vector % The best way to gain an understanding of projection aspect is to % experiment with orientation vectors. The following example uses a % pseudocylindrical projection, the sinusoidal. % %% % Create a default map axes in a sinusoidal projection, turn on the % graticule, and display the coast data set as filled % polygons. The continents and graticule appear in _normal_ aspect. figure; axesm sinusoid framem on; gridm on; tightmap tight load coastlines patchm(coastlat, coastlon,'g') title('Normal aspect: orientation vector = [0 0 0]') %% % Inspect the orientation vector from the map axes. By default, the origin % is set at (0°E, 0°N), oriented 0° from vertical. getm(gca,'Origin') %% % In the normal aspect, the North Pole is at the top of the image. To % create a _transverse_ aspect, imagine pulling the North Pole down to the % center of the display, which was originally occupied by the point % (0°,0°). Do this by setting the first element of |Origin| % parameter to a latitude of 90°N. The shape of the frame is % unaffected--this is still a sinusoidal projection. setm(gca,'Origin',[90 0 0]) title('Transverse aspect: orientation vector = [90 0 0]') %% % The normal and transverse aspects can be thought of as limiting % conditions. Anything else is an _oblique_ aspect. Conceptually, if you % push the North Pole halfway back to its original position, that is, to % the position originally occupied by the point (45°N, 0°E) in the % normal aspect, the result is a simple oblique aspect. You can think of % this as pulling the new origin (45°N, 0°) to the center of the % image, the place that (0°,0°) occupied in the normal aspect. setm(gca,'Origin',[45 0 0]) title('Oblique aspect: orientation vector = [45 0 0]') %% % The previous examples of projection aspect kept the aspect orientation at % 0°. If you alter the orientation, an oblique aspect becomes a % _skew-oblique_ orientation. Imagine the previous example with an % orientation of 45°. Think of this as pulling the new origin % (45°N,0°E), down to the center of the projection and then % rotating the projection until the North Pole lies at an angle of 45° % clockwise from straight up with respect to the new origin. As in the % previous example, the location (45°N,0°E) still occupies the % center of the map. setm(gca,'Origin',[45 0 45]) title('Skew-Oblique aspect: orientation vector = [45 0 45]') %% % The base projection can be thought of as a standard coordinate system, % and the normal aspect conforms to it. The features of a projection are % maintained in any aspect, _relative to the base projection_. As the % preceding illustrations show, the outline (frame) % does not change. Nondirectional projection characteristics also do not % change. For example, the sinusoidal projection is equal-area, no matter % what its aspect. Directional characteristics must be considered % carefully, however. In the normal aspect of the sinusoidal projection, % scale is true along every parallel and the central meridian. This is not % the case for the skew-oblique aspect; however, scale is true along the % paths of the transformed parallels and meridian. % % Any projection can be viewed in alternate aspects and this can often be % quite useful. For example, the transverse aspect of the Mercator % projection is widely used in cartography, especially for mapping regions % with predominantly north-south extent. One candidate for such handling % might be Chile. Oblique Mercator projections might be used to map long % regions that run neither north and south nor east and west, such as New % Zealand.