MAP_CONTINENTS Procedure
Note: Please see the MAPCONTINENTS function, which replicates the functionality of this routine and offers an interactive interface.
The MAP_CONTINENTS procedure draws continental boundaries, filled continents, political boundaries, coastlines, and/or rivers, over a map projection. Outlines can be drawn in low or high-resolution (if the optional high-resolution CIA World Map database is installed). If MAP_CONTINENTS is called without any keywords, it draws low-resolution, unfilled continent outlines.
The MAP_STRUCTURE keyword can be used to draw directly to UV (Cartesian) coordinates. Otherwise, MAP_SET must be called before MAP_CONTINENTS to establish the projection type, the center of the projection, polar rotation and geographic limits.
Examples
The following example demonstrates the use of map outlines to embellish a map projection:
; Handle TrueColor displays:
DEVICE, DECOMPOSED=0
; Load discrete color table:
tek_color
; Match color indices to colors we want to use:
black=0 & white=1 & red=2
green=3 & dk_blue=4 & lt_blue=5
; Set up an orthographic projection centered over the north
; Atlantic.Fill the hemisphere with dark blue. Specify black
; gridlines:
MAP_SET, /ORTHO, 40, -30, 23, /ISOTROPIC, $
/HORIZON, E_HORIZON={FILL:1, COLOR:dk_blue}, $
/GRID, COLOR=black
; Fill the continent boundaries with solid white:
MAP_CONTINENTS, /FILL_CONTINENTS, COLOR=white
; Overplot coastline data:
MAP_CONTINENTS, /COASTS, COLOR=black
; Add rivers, in light blue:
MAP_CONTINENTS, /RIVERS, COLOR=lt_blue
; Show national borders:
MAP_CONTINENTS, /COUNTRIES, COLOR=red, MLINETHICK=2
The following example uses the MAP_STRUCTURE keyword to map the continents in UV (Cartesian) coordinates, without having to set up a !MAP transform using MAP_SET.
; GCTP Polar stereographic projection
mapStruct = MAP_PROJ_INIT(106, LIMIT=[0,-180,90,180], $
CENTER_LATITUDE=90)
; Create a plot window using the UV Cartesian range.
PLOT, mapStruct.uv_box[[0,2]],mapStruct.uv_box[[1,3]], $
/NODATA, /ISOTROPIC, XSTYLE=1, YSTYLE=1
MAP_CONTINENTS, MAP_STRUCTURE=mapStruct
MAP_GRID, MAP_STRUCTURE=mapStruct
Syntax
MAP_CONTINENTS [, /COASTS] [, COLOR=index] [, /CONTINENTS] [, /COUNTRIES] [ ,FILL_CONTINENTS={1 | 2}[, ORIENTATION=value]] [, /HIRES] [, LIMIT=vector] [, MAP_STRUCTURE=structure] [, MLINESTYLE={0 | 1 | 2 | 3 | 4 | 5}] [, MLINETHICK=value] [, /RIVERS] [, SPACING=centimeters] [, /USA]
Graphics Keywords: [, /T3D] [, ZVALUE=value{0 to 1}]
Keywords
COASTS
Set this keyword to draw coastlines, islands, and lakes instead of the default continent outlines. Note that if you are using the low-resolution map database (if the HIRES keyword is not set), many islands are drawn even when COASTS is not set. If you are using the high-resolution map database (if the HIRES keyword is set), no islands are drawn unless COASTS is set.
COLOR
Set this keyword to the color index of the lines being drawn.
CONTINENTS
Set this keyword to plot the continental boundaries. This is the default, unless COASTS, COUNTRIES, RIVERS and/or USA is set.
Note: If you are using the low-resolution map database (if the HIRES keyword is not set), outlines for continents, islands, and lakes are drawn when the CONTINENTS keyword is set. If you are using the high-resolution map database (if the HIRES keyword is set), only continental outlines are drawn when the CONTINENTS keyword is set. To draw islands and lakes when using the high-resolution map database, use the COASTS keyword.
Note: If you are using the USA and CONTINENTS keywords in conjunction to map the outline of each state in the United States onto an existing outline of the continent, you may see discrepancies in the coastline. This is due to the fact that the two outlines are derived from different databases (the USA keyword uses a geographical database, and the CONTINENTS keyword uses a geological database).
COUNTRIES
Set this keyword to draw political boundaries as of 1993.
FILL_CONTINENTS
Set this keyword to 1 to fill continent boundaries with a solid color. The color is set by the COLOR keyword. Set this keyword to 2 to fill continent boundaries with a line fill. For line filling, the COLOR, MLINESTYLE, MLINETHICK, ORIENTATION, and SPACING keywords can be used to control the type of line fill.
Note: When using this keyword in conjunction with the HIRES keyword, lakes on continents will be filled and islands will not be filled.
HIRES
Set this keyword to use high-resolution map data instead of the default low-resolution data. This option is only available if you have installed the optional high-resolution map datasets. If the high-resolution data is not available, a warning is printed and the low-resolution data is used instead.
This keyword can be used in conjunction with the COASTS, COUNTRIES, FILL_CONTINENTS, and RIVERS keywords.
LIMIT
Set this keyword to a four-element vector [Latmin, Lonmin, Latmax, Lonmax] to only plot continents that pass through the LIMIT rectangle. The points (Latmin, Lonmin) and (Latmax, Lonmax) are the latitudes and longitudes of two points diagonal from each other on the region’s boundary. The default is to use the limits from the current map projection.
Note: Line segments for continents which extend outside of the LIMIT rectangle will still be plotted.
MAP_STRUCTURE
Set this keyword to a !MAP structure, as returned from MAP_PROJ_INIT. If this keyword is set, the !MAP system variable is ignored, and the polygons and polylines are drawn using UV (Cartesian) coordinates.
MLINESTYLE
The line style of the boundaries being drawn. Linestyles are described in the table below. The default is 0 for solid.
Index |
Linestyle |
0 |
Solid |
1 |
Dotted |
2 |
Dashed |
3 |
Dash Dot |
4 |
Dash Dot |
5 |
Long Dashes |
MLINETHICK
The thickness of the boundary or fill lines. The default thickness is 1.
ORIENTATION
Set this keyword to the counterclockwise angle in degrees from horizontal that the line fill should be drawn. The default is 0. This keyword only has effect if the FILL_CONTINENTS keyword is set to 2.
RIVERS
Set this keyword to draw rivers.
SPACING
Set this keyword to the spacing, in centimeters, for a line fill. This keyword only has effect if the FILL_CONTINENTS keyword is set to 2. The default is 0.5 centimeters.
USA
Set this keyword to draw borders for each state in the United States in addition to continental boundaries.
Note: If you are using the USA and CONTINENTS keywords in conjunction to map the outline of each state in the United States onto an existing outline of the continent, you may see discrepancies in the coastline. This is due to the fact that the two outlines are derived from different databases (the USA keyword uses a geographical database, and the CONTINENTS keyword uses a geological database).
Version History
Pre 4.0 |
Introduced |
6.1 |
Added MAP_STRUCTURE keyword |
See Also
MAP_GRID Procedure, MAP_IMAGE, MAP_PATCH, MAP_PROJ_INIT, MAP_SET Procedure