Plots a map dataset.
CAUTION: The Axes keyword labels the points where meridians or parallels cross the border of a plot. Because of inaccuracies of the reverse projection algorithms used to accomplish this, the labeling can sometimes be omitted or be incorrect for wide area plots and certain projection methods. In general, when a smaller area is plotted, the labeling is correct.
Boundary If specified, plots the boundary calculated by the Exact keyword. The color used is set by the Gridcolor keyword. This keyword has no effect if the Exact keyword is not set. Boundary is most useful in debugging, or if you wish to identify the possibly non-rectangular closed area specified by your map bounds. (Default: off)
Center (float) Array containing a longitude and latitude value that defines the center of the geographic area to be displayed. This keyword is an alternative to using the Range keyword. Use this keyword in conjunction with the Zoom keyword to specify the center of the area to zoom in on. Default: [-50.0, 0.0].
Color (integer) Specifies the plot color for lines. Default is !P.Color. If set to -1, the colors defined in the dataset are used. This keyword can specify a scalar or an array containing a different color for each line segment or polygon. See the Discussion section for more information.
Data (string) Specifies the name of the map dataset to plot. Datasets provided with PV-WAVE include World Dataset II (
world_db
) and USGS Digital Line Graph Dataset (usgs_db
). (Default: world_db
)
Exact If specified, MAP attempts to fit the map area exactly to the latitude/longitude lines specified by the Range or Center/Zoom keywords. The aspect ratio of the resulting map is also correct, and the largest map possible that fits in the window/position is produced. The Exact keyword projects points along the latitude/longitude boundary specified by the Range or Center/Zoom keywords and uses the minimum and maximum values of the projected data to establish the data coordinate system. The Exact keyword usually results in very precise map ranges, but can fail for some projections if a singularity (like one of the poles) exists within the range specified. If such a singularity exists, then the default range calculation is used. (Default: off)
usgs_db
dataset can be filled. To fill a state, you must set the COUNTY
field to -1 (using the Select keyword). To fill multiple states, you must make separate calls to MAP.
GridLines If present and nonzero, overlays a grid on the map projection.
Image Specifies an image (2D array) to be warped around the map projection and displayed with the map lines. If the image array is not of type byte, it will be automatically passed through the BYTSCL procedure before being plotted. The image will be warped to exactly cover the area specified using the Range keyword.
Parameters (double) Specifies an array of up to 10 elements containing parameters to be passed to a map projection. The only built-in projection methods that use these parameters are the conic projections. The parameters currently used by the built-in projections are defined as follows:
parameter(0)
The first secant intersection. (Default: 33 degrees north)
parameter(1)
The second secant intersection. (Default: 45 degrees north)
Position = [.1,.1,.9,.9]
leaves a border around the map 1/10 the screen size. The Position default is the value of !P.Position.Projection (integer) Specifies the type of projection (see the Discussion section for a table of projection types). (Default: 1, equidistant cylindrical)
Radius (float) Specifies a 2D array of the same size as the one specified by the Image keyword. The radius array will be used to modify the shape of the sphere used with
Projection=99
. The size of the array should be normalized to values between zero and one for best results. This keyword can be used to create a sphere with geographical relief displayed. The map data may not line up exactly with the radius of the sphere. Range (float) [lon1, lat1, lon2, lat2] Array of four points representing the lower-left and upper-right longitude/latitude coordinates of the region to be displayed. Used to specify the exact geographical area to display. An alternative method of area selection is to use the Center and Zoom keywords.
Read_Path (string) Used to specify the name of a file created with the File_Path keyword. The data contained in this file is projected and plotted. Specifying this keyword causes the Data, Select, and Resolution keywords to be ignored.
Resolution (integer) The effect of this keyword depends on which map dataset is used, the default
world_db
dataset or the usgs_db
dataset:
world_db
dataset is used, the default) Provides a way to speed up the projection and plotting of large datasets. Specifies the number of data points to skip when a dataset is plotted. For example, Res=30
means skip every 30th point in the dataset. Specifying a larger value for this keyword results in faster plotting times, but poorer image quality. Specifying smaller values results in slower plotting times, but gives improved image quality. The default value is chosen based on the range of the map and is optimized for the 300,000 points in the world_db
dataset. A reasonable range of values for the world_db
dataset is between one and 30. (If Data='USGS_DB') Resolution is not a measure of how many points to skip when sampling, as is done with the default map dataset, but a measure of the minimum distance (in latitude/longitude) between points. Resolution values should range between 0.01 and 0.2 for good results. The sampling is not used for county boundaries, or for Hawaii and Alaska. The code to sample the data is slow, so should be used with the File_Path keyword of the MAP procedure to save the sampled map, which can be later displayed with the Read keyword of the MAP procedure. (Default: off)
Select (unnamed structure) Specifies a subset of the dataset to plot. See the Discussion for more information on this keyword.
Stretch If present and non-zero causes the plot area to be scaled to the actual range of data points extracted from the dataset. This stretches any subset of data to occupy the entire plot area. (See the Discussion section for more information.)
User (string) Specifies the name of a user-defined projection procedure. If this keyword is used, then the Projection keyword is automatically set to -1.
Zoom (float) Specifies a factor by which the display is magnified or reduced around a center point specified with the Center keyword. For example, a factor 2 magnifies the region surrounding the center point by two times. The default value is 1.0.
Linestyle | Line_Fill | Spacing | Threshold |
Pattern | NoData | Orientation | |
Fill_Pattern | NoErase | Thick |
world_db
) and USGS Digital Line Graph (usgs_db
) datasets.
rovided by the U.S. Department of Commerce, merged with updated country data from the National Imagery and Mapping Agency (NIMA).
NOTE: The World Databank II dataset is a subset of a public domain dataset p
world_db
dataset by passing an unnamed structure via the Select keyword. The following table lists the possible fields and tags of this structure:
NOTE: If the field is set to a null string, all tags are plotted.
usgs_db
dataset by passing an unnamed structure via the Select keyword. The following table lists the possible fields and tags of this structure
Fields | Tags |
---|---|
STATE
| One or more FIPS codes for the states to plot (two-letter state abbreviations can also be used AL, AK, AZ, AR, CA, etc.). |
COUNTY
| One or more FIPS codes for the counties to plot. (-1 draws all counties; 0 draws no counties). |
MAP, Select={, GROUP:['CIL'], AREA:'ASIA'}
MAP, Data='usgs_db', Range=[-81,39,-75,43],$ /Gridlines, Gridstyle=2, Gridlat=1, $ Gridlong=5, Select={,STATE:'PA',COUNTY:-1}
NOTE: IfCOUNTY
is anything but 0, only the first state specified can be plotted. To plot multiple states/counties, you must make separate calls to MAP.
CAUTION: This USGS data is from the USGS 1:2,000,000 Scale Digital Line Graph CD. Note that some errors exist in the original data. For instance, when filling counties along coastlines, the filling will be inexact because the original polygon data for each county did not include the coastline portion.
Color assignments in the
WORLD_DB
dataset:
USGS_DB
dataset:
COUNTY
tag field = 0): Color = State FIPS code
!P.position = [0.3, 0.1, 0.7, 0.9] TEK_COLOR MAP, Range = [-118.0, 40.5, -110.0, 50.0],$ Data = 'usgs_db', $ Select = {, state:'ID', county:-1}, $ Thick = 2, /Axes, /Gridlines, $ Gridcolor = 10, Gridstyle = 1, $ Gridlong = 1, Gridlat = 0.5
Figure 2-53 A map of Idaho plotted from the USGS Digital Line Graph Dataset. County boundaries are also plotted.
Figure 2-54 A map of Idaho plotted from the USGS Digital Line Graph Dataset. County boundaries are also plotted.
These keywords can greatly increase the performance of your application. To use these keywords, specify a file pathname when you select a subset of the data, as in this example:
MAP, DATA='world_db', RANGE=[-150, 30, 30, 70], $ SELECT={, GROUP:'cil'}, $ RESOLUTION=20, FILE_PATH='mymap.dat'
world_db
dataset, as in this example:
MAP, Range=[-150, 30, 30, 70], Projection=4,$ Read_Path='mymap.dat'
For more information on mapping projections and in-depth discussions of algorithms and uses of the projections used with the MAP procedure, refer to:
Box 25286, Building 810
Denver Federal Center
Denver, CO USA 80225
Phone: (303) 236-7476
FAX: (303) 236-4031