.TH p.map .SH NAME \fIp.map\fR \- Hardcopy color map output utility. .br .I "(GRASS Hardcopy Output Program)" .SH SYNOPSIS \fBp.map\fR .br \fBp.map help\fR .br \fBp.map\fR [\fBinput\*=\fIname\fR] [\fBscale\*=\fImapscale\fR] .SH DESCRIPTION .I p.map produces hardcopy color map products on your system's color output device. Output can include a raster map, any number of vector overlays, site data, text labels, and other spatial data. This program has 2 distincts modes of operation. The command-line mode requires the user to prepare a file of mapping instructions describing the various spatial and textual information to be printed prior to running \fIp.map\fR. The interactive mode (i.e., no command-line arguments) will prompt the user for items to be mapped and does not require the user to prepare a file of instructions. The command-line parameters are: .IP \fBinput\*=\fIname\fR 18 File containing mapping instructions. (or enter \fBinput\*=-\fR to enter from keyboard). These instructions are described in detail below. .IP \fBscale\*=\fImapscale\fR 18 Scale of the output map, e.g. 1:25000 .br Default: 1panel This parameter is provided as a convenience. It is identical to the .I scale mapping instruction described below. .LP Note: the user must select an output device using .I p.select before running \fIp.map\fR. Also, the .I preview device can be selected to view the output from .I p.map on the graphics monitor instead of sending it to a paper printer. .SH "MAPPING INSTRUCTIONS" The mapping instructions allow the user to specify various spatial data to be plotted. These instructions are normally prepared in a regular text file using a system editor. Some instructions are single line instructions while others are multiple line. Multiple line instructions consist of the main instruction followed by a subsection of one or more additional instructions. .SH colormode Selects the appropriate method to color raster map layers and images. .TS ll. USAGE: \fBcolormode\fR approx\*|best .TE There are two methods: .I approximate and .I best. From a user perspective, .I approximate can be used for raster map layers with few categories, such as soils, and .I best should be used for images like LANDSAT images or NHAP photos, or maps with many categories. The .I approximate mode treats each pixel independently, giving it the printer color that best approximates the true color. The .I best mode "blends" colors from pixel to pixel using a dithering technique to simulate more colors than the printer can actually print. The default, if unspecified, is .I best. This example would select the .I approximate colormode. The assumption is that the raster map layer being printed is has few colors or that the colors would not look good dithered. .TS ll. EXAMPLE: \fBcolormode\fR approx .TE .SH colortable Includes the color table for the raster map layer in the legend below the map .TS ll. USAGE: \fBcolortable\fR [y\*|n] .TE The color table will display the colors for each raster map layer category value and the category label. To get a color table, you must have previously requested a raster map layer. Omitting the \fBcolortable\fR instruction would result in no color table. \fBNote\fR: Be careful about asking for color tables for raster map layers which have many categories, such as elevation. This could result in the printing of an extremely long color table!!!!! This example would print a color table as part of the legend to the map. .TS ll. EXAMPLE: \fBcolortable\fR y .TE .SH comments Prints comments beneath the map . You may submit comment text line by line during \fIp.map\fR execution or a via a prepared comments file. .TS ll. USAGE: \fBcomments\fR [commentfile] comments \fBend\fR .TE This example prints the comment "This is a comment" in the legend below the map. .TS ll. EXAMPLE: \fBcomments\fR \ \ This is a comment. \ \ \fBend\fR .TE This example prints whatever is in the file \fIveg.comments\fR in the legend below the map. .TS ll. EXAMPLE: \fBraster\fR vegetation \fBcomments\fR veg.comments \ \ \fBend\fR .TE Presumably, the file .I veg.comments contain comments pertaining to the raster map layer \fIvegetation\fR, such as "This map was created by classifying a LANDSAT TM image". .SH defpat Defines area fill patterns to be used in the .I setpat instruction. .TS ll. USAGE: \fBdefpat\fR name pattern \fBcolor\fR # color \fBend\fR .TE The pattern is given a name on the \fIdefpat\fR instruction line. The pattern which follows is composed of a sequence of numbers 0-9 (and blanks, which are equivalent to 0). The blanks or zeros indicate holes in the pattern where the normal category color would show thru. The other number 1-9 indicate pattern pixels and can be assigned any color. The default color for all the digits will be black unless specified with the .I color instruction. The color option will begin by entering the word .I color followed by one of the digits (1-9) in the pattern, followed by one of the NAMED COLORS. This should be repeated for each of the digits specified to avoid using black. The instruction .I end terminates the pattern definition. Of course, the user can define more patterns by entering more .I defpat instructions. .B NOTE: Do NOT indent the pattern. Leading blank spaces will be interpreted as 0's. This example creates a black horizontal line pattern. .TS ll. EXAMPLE: \fBdefpat\fR horiz 1 0 0 0 \fBcolor\fR 1 black \fBend\fR .TE This example creates a green vertical line pattern. .TS ll. EXAMPLE: \fBdefpat\fR vert 1000 \fBcolor\fR 1 green \fBend\fR .TE This example creates a red diagonal line pattern. .TS ll. EXAMPLE: \fBdefpat\fR diag 00001 0001 001 01 1 \fBcolor\fR 1 red \fBend\fR .TE This example creates a two-toned tree pattern with orange trunks and green leaves. .TS ll. EXAMPLE: \fBdefpat\fR tree 2 222 22122 22 1 22 1 2 222 22122 22 1 22 1 \fBcolor\fR 1 orange \fBcolor\fR 2 black \fBend\fR .TE .SH endpanel Specifies which panel number to end printing. The default is 0, and will print all panels from the startpanel to the last panel. .TS ll. EXAMPLE: \fBendpanel\fR 4 .TE This example would end output at panel 4. .SH grid Overlays a coordinate grid onto the output map. .TS l l. USAGE: \fBgrid\fR spacing \ \ \fBcolor\fR color \ \ \fBnumbers\fR # [color] \ \ \fBend\fR .TE The \fBspacing\fR of the grid is given (in the geographic coordinate system units) on the main instruction line. The subsection instructions allow the user to specify the \fBcolor\fR of the grid lines, whether coordinate \fBnumbers\fR should appear on the grid lines, and if they should appear every grid line (1), every other grid line (2), etc., and what color the numbers should be. The defaults are black grid lines, unnumbered. This example would overlay a green grid with a spacing of 10000 meters (for a metered database, like UTM) onto the output map. Alternate grid lines would be numbered with red numbers. .TS l l. EXAMPLE: \fBgrid\fR 10000 \ \ \fBcolor\fR green \ \ \fBnumbers\fR 2 red \ \ \fBend\fR .TE .SH labels Selects a labels file for output (see manual entry for .I p.labels). .TS l l. USAGE: \fBlabels\fR labelfile\*|\fIlist\fR .TE This example would paint labels from the labels file called \fItown.names\fR. Presumably, these labels would indicate the names of towns on the map. .TS ll. EXAMPLE: \fBlabels\fR town.names .TE .SH line Draws lines on the output map. .TS l l. USAGE: \fBline\fR east north east north \fBline\fR x% y% x% y% \ \ \fBcolor\fR color \ \ \fBwidth\fR # \ \ \fBmasked\fR [y\*|n] \ \ \fBend\fR .TE The beginning and ending points of the line are entered on the main instruction. These points can be defined either by map coordinates or by using percentages of the geographic region. The user may also specify line .B color, .B width in pixels, and if the line is to be .B masked by the current mask. (See manual entry for \fIr.mask\fR for more information on the mask.) .LP This example would draw a yellow line from the point x\*=10% y\*=80% to the point x\*=30% y\*=70%. This line would be 2 pixels wide and would appear even if there is a mask. .TS l l. EXAMPLE: \fBline\fR 10% 80% 30% 70% \ \ \fBcolor\fR yellow \ \ \fBwidth\fR 2 \ \ \fBmasked\fR n \ \ \fBend\fR .TE Of course, multiple lines may be drawn with multiple .I line instructions. .SH outline Outlines the areas of a raster map layer with a specified color. .TS l l. USAGE: \fBoutline\fR \ \ \fBcolor\fR color \ \ \fBend\fR .TE .LP Distinct areas of the raster map will be separated from each other visually by drawing a border (or outline) in the specified .B color (default: black). Note: it is important the user enter the instruction \fBend\fR even if a color is not chosen. (It is hoped that in the future the outline of a different raster map layer other than the one currently being painted may be placed on the map.) This example would outline the category areas of the .I soils raster map layer in grey. .TS l l. EXAMPLE: \fBraster\fR soils \fBoutline\fR \fBcolor\fR grey \fBend\fR .TE .SH point Places additional points or icons on the output map. .TS l l. USAGE: \fBpoint\fR east north \fBpoint\fR x% y% \ \ \fBcolor\fR color \ \ \fBicon\fR iconfile\*|\fIlist\fR \ \ \fBsize\fR # \ \ \fBmasked\fR [y\*|n] \ \ \fBend\fR .TE The point location is entered in the main instruction line by giving either the map coordinates or by using percentages of the geographic region. The user may also specify the point .B color, the \fBicon\fR file to be used to represent the point location (see the the manual entry for .I p.icons), the \fBsize\fR of the icon in integer multiples of the pattern in the icon file, and whether the point is to be \fBmasked\fR by the current mask. (See manual entry for \fIr.mask\fR for more information on the mask.) This example would place a purple diamond (from icon file \fIdiamond\fR) at the point (E456000 N7890000). This diamond would be the same size it is in the diamond icon file and would not be masked by the current mask. .TS l l. EXAMPLE: \fBpoint\fR 456000 7890000 \ \ \fBcolor\fR purple \ \ \fBicon\fR diamond \ \ \fBsize\fR 1 \ \ \fBmasked\fR n \ \ \fBend\fR .TE Of course, multiple points may be drawn with multiple .I point instructions. .SH raster Selects a raster map layer for output. .TS l l. USAGE: \fBraster\fR mapname\*|\fIlist\fR .TE For each .I p.map run, only one raster map layer can be requested. If no raster map layer is requested, a completely white map will be produced. It can be useful to select no raster map layer in order to provide a white background for vector images. This example would paint a map of the raster map layer \fIsoils\fR. .TS l l. EXAMPLE: \fBraster\fR soils .TE .SH read Provides \fIp.map\fR with a previously prepared input stream. .TS l l. USAGE: \fBread\fR previously prepared UNIX file .TE Mapping instructions can be placed into a file and read into .I p.map. .B Note: .I p.map will not search for this file. The user must be in the correct directory or specify the full path on the \fBread\fR instruction. (Note to /bin/csh users: ~ won't work with this instruction). This example reads the UNIX file \fIpmap.roads\fR into \fIp.map\fR. This file may contain all the \fIp.map\fR instructions for placing the vector map layer \fIroads\fR onto the output map. .TS l l. EXAMPLE: \fBread\fR pmap.roads .TE The user may have created this file because this vector map layer is particularly useful for many \fIp.map\fR outputs. By using the \fBread\fR option, the user need not enter all the input for the \fBvector\fR instruction, but simply \fBread\fR the previously prepared file with the correct instructions. .SH region Places the outline of a smaller geographic region on the output. .TS l l. USAGE: \fBregion\fR regionfile\*|\fIlist\fR \ \ \fBcolor\fR color \ \ \fBwidth\fR # \ \ \fBend\fR .TE Geographic region settings are created and saved using \fIg.region\fR. The \fIp.map\fR \fIregion\fR option can be used to show an outline of a smaller region which was printed on a separate run of \fIp.map\fR on other user-created maps. The user can specify the \fBcolor\fR and the \fBwidth\fR (in pixel units) of the outline. The default is a black border of one pixel width. .LP This example would place a white outline, 2 pixels wide, of the geographic region called \fIfire.zones\fR onto the output map. This geographic region would have been created and saved using \fIg.region\fR. .TS l l. EXAMPLE: \fBregion\fR fire.zones \ \ \fBcolor\fR white \ \ \fBwidth\fR 2 \ \ \fBend\fR .TE .SH scale Selects a scale for the output map. .TS l l. USAGE: \fBscale\fR \fIscale\fR .TE The scale can be selected either as: .IP a relative ratio, e.g. 1:25000; .IP an absolute width of the printed map, e.g. 10 inches; .IP the number of printed paper panels, e.g. 3 panels; .IP the number of miles per inch, e.g. 1 inch equals 4 miles. .LP This example would set the scale of the map to 1 unit \*= 25000 units. .TS l l. EXAMPLE: \fBscale\fR 1:25000 .TE .SH setcolor Overrides the color assigned to one or more categories of the raster map layer. .TS l l. USAGE: \fBsetcolor\fR cat(s) color .TE This example would set the color for categories 2,5 and 8 of the raster map layer \fIwatersheds\fR to white and category 10 to green. (\fBNOTE\fR: no spaces are inserted between the category values.) .TS l l. EXAMPLE: \fBraster\fR watersheds \fBsetcolor\fR 2,5,8 white \fBsetcolor\fR 10 green .TE Of course, .I setcolor can be requested more than once to override the default color for additional categories. More than one category can be changed for each request by listing all the category values separated by commas (but with no spaces). .SH setpat Assigns a (previously defined) pattern on a raster map layer category. .TS l l. USAGE: \fBsetpat\fR cat name or \fBsetpat\fR \fIbuiltin\fP or \fBsetpat\fR \fIall\fP .TE The user can choose to use: the name of a specific pattern created using \fBdefpat\fR (see above); the patterns built into \fIp.map\fR; or all the patterns the user may have created. This example assigns the vertical pattern created using \fBdefpat\fR (see example in \fBdefpat\fR above) to category 3 of the raster map layer \fIvegetation\fR and the tree pattern (see example in \fBdefpat\fR above) to category 10. .TS l l. EXAMPLE: \fBraster\fR veg \fBsetpat\fR 3 vert \fBsetpat\fR 10 tree .TE This example reads a previously prepared UNIX file .I horiz.pat with the correct \fBdefpat\fR instructions for creating a black horizontal pattern (see example in \fBdefpat\fR above) and assigns that pattern to category 5 of the raster map layer \fIsoils\fR via the \fBsetpat\fR instruction. .TS l l. EXAMPLE: \fBraster\fR soils \fBread\fR horiz.pat \fBsetpat\fR 5 horiz .TE To select the builtin patterns: .TS l l. EXAMPLE: \fBraster\fR soils \fBsetpat\fR builtin .TE To select individual builtin patterns: .TS l l. EXAMPLE: \fBraster\fR soils \fBsetpat\fR 5 #1 \fBsetpat\fR 10 #2 .TE .SH startpanel Specifies at which panel number to begin printing. Default is 0 and would start printing from the first panel. .TS l l. EXAMPLE: \fBstartpanel\fR 2 .TE This example would begin printing at panel 2. .SH sites Selects sites data to be placed on the output map (see manual entry for \fIs.menu\fR). .TS l l. USAGE: \fBsites\fR sitemap\*|\fIlist\fR \ \ \fBcolor\fR color \ \ \fBicon\fR iconfile\*|\fIlist\fR \ \ \fBsize\fR # \ \ \fBdesc\fR [y\*|n] \ \ \fBend\fR .TE The user may specify the the \fBcolor\fR of the sites (see section on NAMED COLORS below); the \fBicon\fR to be used to represent the presence of a site (see the manual entry for \fIp.icons\fR); the \fBsize\fR of the icon (number of times larger than the size it is in the icon file); and whether or not the \fBdesc\fRription associated with each site is also to be printed. This example would paint a sites map with blue windmills (from an icon file created by the user using the .I p.icons GRASS command) placed at all windmill locations (from a sites list). These windmills would be two times larger than the size of the icon in the icon file and have descriptions from the sites list file printed beside them. .TS l l. EXAMPLE: \fBsites\fR windmills \ \ \fBcolor\fR blue \ \ \fBicon\fR windmill \ \ \fBsize\fR 2 \ \ \fBdesc\fR y \ \ \fBend\fR .TE .SH text Places text on the map. .TS l l. USAGE: \fBtext\fR east north text \fBtext\fR x% y% text \ \ \fBfont\fR fontname \ \ \fBcolor\fR color\*|none \ \ \fBwidth\fR # \ \ \fBhcolor\fR color\*|none \ \ \fBhwidth\fR # \ \ \fBbackground\fR color\*|none \ \ \fBborder\fR color\*|none \ \ \fBsize\fR # \ \ \fBref\fR reference point \ \ \fBxoffset\fR # \ \ \fByoffset\fR # \ \ \fBopaque\fR [y\*|n] \ \ \fBend\fR .TE The user specifies where the text will be placed by providing map coordinates or percentages of the geographic region map. The text follows these coordinates on the same instruction line. More than one line of text can be specified by notating the end of a line with .B \en (e.g. USA\|\enCERL). The user can then specify various text features: .B font: cyrilc gothgbt gothgrt gothitt greekc greekcs greekp greeks italicc italiccs italict romanc romancs romand romans romant scriptc scripts (The default font is romans); .B color (see NAMED COLORS); .B width of the lines used to draw the text (to make thicker letters); .B size as the vertical height of the letters in meters on the ground (text size will grow or shrink depending on the scale at which the map is painted); the highlight color (\fBhcolor\fR) and the width of the highlight color (\fBhwidth\fR); the text-enclosing-box \fBbackground\fR color; the text box \fBborder\fR color; .B ref. This reference point specifies the text handle - what part of the text should be placed on the location specified by the map coordinates. Reference points can refer to: [lower\*|upper\*|center]\ [left\*|right\*|center] of the text to be printed; .B yoffset, which provides finer placement of text by shifting the text a vertical distance in pixels from the specified north. The vertical offset will shift the location to the south if positive, north if negative; .B xoffset, which shifts the text a horizontal distance in pixels from the specified east The horizontal offset will shift the location east if positive, west if negative; whether or not the text should be \fBopaque\fR to vectors. Entering \fBno\fR to the opaque option will allow the user to see any vectors which go through the text's background box. Otherwise, they will end at the box's edge. .LP This example would place the text \fISPEARFISH LAND COVER\fR at the coordinates E650000 N7365000. The text would be a total of 3 pixels wide (2 pixels of red text and 1 pixel black highlight), have a white background enclosed in a red box, and be 500 meters in size. The lower right corner of the text would be centered over the coordinates provided. All vectors on the map would stop at the border of this text. .TS l l. EXAMPLE: \fBtext\fR 650000 7365000 SPEARFISH LAND COVER \ \ \fBfont\fR romand \ \ \fBcolor\fR red \ \ \fBwidth\fR 2 \ \ \fBhcolor\fR black \ \ \fBhwidth\fR 1 \ \ \fBbackground\fR white \ \ \fBborder\fR red \ \ \fBsize\fR 500 \ \ \fBref\fR lower left \ \ \fBopaque\fR y \ \ \fBend\fR .TE .SH vector Selects a vector map layer for output. .TS l l. USAGE: \fBvector\fR vectormap\*|\fIlist\fR \ \ \fBcolor\fR [#] color \ \ \fBwidth\fR # \ \ \fBhcolor\fR color \ \ \fBhwidth\fR # \ \ \fBmasked\fR [y\*|n] \ \ \fBstyle\fR 0-9 \ \ \fBend\fR .TE The user can specify the \fBcolor\fR of the vectors; the \fBwidth\fR of the vectors lines in pixels; the highlight color (\fBhcolor\fR) for the vector lines; the width of the highlight color (\fBhwidth\fR) in pixels; whether or not the raster map layer is to be \fBmasked\fR by the current mask (see manual entry \fIr.mask\fR for more information on the mask); and the line \fBstyle\fR. The line style allows the vectors to be dashed in different patterns and colors. This is done by typing a series of numbers (0-9) in a desired sequence or pattern. Colors for the numbers (1-9) can be assigned using the \fBcolor\fR instruction. Blanks and non-digit characters are recognized as 0's. Using 0 would allow the colors of the raster map layer (or the background color if no raster map layer was selected) to show through. .LP This example would paint a map of the vector map layer named \fIstreams\fR. These streams would be a total of 3 pixels wide (the inner two pixels blue and the outer highlight pixel white). The map would not show streams outside of the current mask. .TS l l. EXAMPLE: \fBvector\fR streams \ \ \fBcolor\fR blue \ \ \fBwidth\fR 2 \ \ \fBhcolor\fR white \ \ \fBhwidth\fR 1 \ \ \fBmasked\fR y \ \ \fBend\fR .TE This example would paint a map of the vector map layer \fIroads\fR. These roads would be 2 pixels wide and would be dashed blank-black-red (the blank areas would show what lies under the roads). This map would show roads inside and outside of the current mask. .TS l l. EXAMPLE: \fBvector\fR roads \ \ \fBwidth\fR 2 \ \ \fBstyle\fR 001122 \ \ \fBcolor\fR 1 black \ \ \fBcolor\fR 2 red \ \ \fBmasked\fR n \ \ \fBend\fR .TE .SH verbose Changes the amount of talking \fIp.map\fR will do. .TS l l. USAGE: \fBverbose\fR [0\*|1\*|2] .TE A higher value implies more chatter. The default is 2. This example sets the amount of chatter to a minimum. .TS l l. EXAMPLE: \fBverbose\fR 0 .TE .SH end Terminates input and begin painting the map. .TS ll. USAGE: \fBend\fR .TE .SH NAMED COLORS The following are the colors that are accepted by \fIp.map\fR: aqua black blue brown cyan gray green grey indigo magenta orange purple red violet white yellow .SH ICONS VS. PATTERNS Icons and patterns as used in \fIp.map\fR are not the same thing. Patterns are defined and are normally used to cover those extended areas covered by a raster map layer category. A pattern will repeat above, below and adjacent to itself. Icons are used to represent a single point. Patterns are supported directly within .I p.map using the .I defpat instruction, while icons must be created using the .I p.icons program. .if t .bp .SH EXAMPLE p.map INPUT FILE The following is an example of a \fIp.map\fR script file. The file has been name \fIspear.soils\fR. For the purposes of illustration, the file is in two columns. This script file can be entered at the command line: .RS \fBp.map input\*=spear.soils\fR .RE .TS lw(18) lw(42) lw(20) lw(42). (cont.) \fBraster\fR soils \fBdefpat\fR diag \fBvector\fR streams 000001 \fBcolor\fR blue 00001 \fBwidth\fR 2 0001 \fBhcolor\fR white 001 \fBhwidth\fR 1 01 \fBmasked\fR y 1 \fBend\fR \fBcolor\fR 1 red \fBvector\fR roads \fBend\fR \fBwidth\fR 2 \fBsetpat\fR 4 diag \fBstyle\fR 001122 \fBtext\fR 608000.00 3476004.73 SPEARFISH SOILS MAP \fBcolor\fR 1 black \fBcolor\fR red \fBcolor\fR 2 red \fBwidth\fR 2 \fBmasked\fR n \fBhcolor\fR black \fBend\fR \fBhwidth\fR 1 \fBlabels\fR town.names \fBbackground\fR white \fBregion\fR subregion \fBborder\fR red \fBcolor\fR white \fBsize\fR 500 \fBwidth\fR 2 \fBref\fR lower left \fBend\fR \fBopaque\fR y \fBgrid\fR 10000 \fBend\fR \fBcolor\fR green \fBline\fR 606969.73 3423092.91 616969.73 3423092.91 \fBnumbers\fR 2 red \fBcolor\fR yellow \fBend\fR \fBwidth\fR 2 \fBoutline\fR \fBopaque\fR yes \fBcolor\fR black \fBend\fR \fBend\fR \fBpoint\fR 40% 60% \fBcolortable\fR\ y \fBcolor\fR purple \fBcomments\fR \fBicon\fR diamond This is a comment \fBsize\fR 2 \fBend\fR \fBmasked\fR n \fBscale\fR 1:25000 \fBend\fR \fBsetcolor\fR 6,8,9 white \fBend\fR \fBsetcolor\fR 10 green .TE .SH "INTERACTIVE MODE" If the user simply enter .I p.map without arguments, then a simple prompting session occurs. Some, but not all of the non-interactive requests are available at this level. .SH "SEE ALSO" .I p.chart, .I p.icons, .I p.labels, .I p.select .SH AUTHOR Michael Shapiro, U.S. Army Construction Engineering Research Laboratory