Display contours of constant map distortion on
h = mdistort(...)
mdistort, with no input arguments, toggles the display
of contours of projection-induced distortion on the current
axesm-based map. The magnitude of the
distortion is reported in percent.
mdistort off removes the
mdistort parameter displays contours of distortion for
the specified parameter. Units are in percent deviation (except for angles
for which degrees are used).
|maximum angular distortion of right angles|
|maximum scale (the default)|
|scale along the parallels|
|scale along the meridians|
|ratio of maximum and minimum scale|
the levels for which the contours are drawn.
a vector of values as used by
contour. If empty,
the default levels are used.
the size of the underlying graticule matrix used to compute the contours.
a two-element vector containing the number of rows and columns. If
omitted, the default Mapping Toolbox™ graticule size of
100] is assumed.
h = mdistort(...) returns a handle to the contour
group object containing the contours and text.
Map projections inevitably introduce distortions in the shape and size of objects as they are transformed from three-dimensional spherical coordinates to two-dimensional Cartesian coordinates. The amount and type of distortion vary between projections, over the projection, and with the selection of projection parameters such as standard parallels. This function provides a quantitative graphical display of distortion parameters.
mdistort is not intended for use with UTM.
Distortion is minimal within a given UTM zone.
a warning if a UTM projection is encountered.
View Extreme Area Distortion of Mercator Projection
The extreme area distortion of the Mercator projection. This makes it ill-suited for global displays.
figure axesm mercator load coastlines framem; plotm(coastlat,coastlon,'color',.5*[1 1 1]) mdistort('area', [1 30 100 200 500 1000])
View Lines of Distortion for Bonne Projection
View lines of distortion for the Bonne projection.
figure axesm bonne load coastlines framem plotm(coastlat,coastlon,'color',0.5*[1 1 1]) mdistort('angles',0:15:90)
View Distortion of Conic Projection with Properly Chosen Parallels
An equidistant conic projection with properly chosen parallels can map the conterminous United States with less than 1.5% distortion.
figure usamap conus load conus patchm(uslat, uslon, [1 0.7 0]) plotm(statelat, statelon) patchm(gtlakelat, gtlakelon, 'cyan') framem off; gridm off; mlabel off; plabel off mdistort('parscale', -2:.5:2)
View Contours of Scale Ratios
Create a map in normal aspect using a Hammer projection and plot a graticule and frame. Load the coast data set and plot it as gray patches.
figure axesm('MapProjection','hammer','Grid','on','Frame','on') load coastlines patchm(coastlat,coastlon,'FaceColor',[0.95 0.95 0.95])
Plot contours of minimum-to-maximum scale ratios by using the
mdistort function. Notice that the region of minimum distortion is centered around (0,0).
Repeat this diagram with a Bonne projection in a new figure window. Notice that the region of minimum distortion is centered around (30,0) which is where the single standard parallel is.
figure axesm('MapProjection','bonne','Grid','on','Frame','on') patchm(coastlat,coastlon,'FaceColor',[0.95 0.95 0.95]) mdistort('scaleratio')
mdistort can help in the placement of standard parallels for projections.
Standard parallels are generally placed to minimize distortion over the
region of interest. The default parallel locations might not be appropriate
for maps of smaller regions.