1ps.map(1)                     Grass User's Manual                    ps.map(1)
2
3
4

NAME

6       ps.map  - Hardcopy PostScript map output utility.
7

KEYWORDS

9       postscript, map, printing
10

SYNOPSIS

12       ps.map
13       ps.map help
14       ps.map   [-rpe]   [input=string]    [output=string]    [scale=mapscale]
15       [copies=integer]   [--verbose]  [--quiet]
16
17   Flags:
18       -r
19           Rotate plot 90 degrees
20
21       -p
22           List paper formats ( name width height left right  top  bottom(mar‐
23           gin) )
24
25       -e
26           Create EPS (Encapsulated PostScript) instead of PostScript file
27
28       --verbose
29           Verbose module output
30
31       --quiet
32           Quiet module output
33
34   Parameters:
35       input=string
36           File  containing mapping instructions (or use input=- to enter from
37           keyboard)
38
39       output=string
40           PostScript output file
41
42       scale=mapscale
43           Scale of the output map, e.g. 1:25000 (default: Auto-sized  to  fit
44           page)
45
46       copies=integer
47           Number of copies to print
48           Options: 1-20
49

DESCRIPTION

51       ps.map  is  a  cartographic  mapping program for producing high quality
52       hardcopy maps in PostScript format. Output can include  a  raster  map,
53       any number of vector overlays, text labels, decorations, and other spa‐
54       tial data.
55
56       A file of mapping instructions that describes the various  spatial  and
57       textual  information  to  be  printed must be prepared prior to running
58       ps.map.
59

NOTES

61       The order of commands is generally unimportant but may affect how  some
62       layers  are  drawn.  For  example to plot vpoints above vareas list the
63       vpoints entry first. Raster maps are always drawn  first,  and  only  a
64       single raster map (or 3 if part of a RGB group) may be used.
65
66       The  hash  character  ('#')  may  be used at the beginning of a line to
67       indicate that the line is a comment. Blank lines will also be ignored.
68
69       Be aware that some mapping instructions require  the  end  command  and
70       some  do  not. Any instruction that allows subcommands will require it,
71       any instruction that does not allow subcommands will not.
72
73       The resolution and extent of raster maps plotted with ps.map  are  con‐
74       trolled  by  the  current  region settings via the g.region module. The
75       output filesize is largely a function of the region resolution, so spe‐
76       cial  care  should  be taken if working with large raster datasets. For
77       example if the desired output is US-Letter sized paper at 300dpi,  with
78       1"  margins  and the raster filling the entire page, the usable area on
79       the page will be 6.5" x 9", which at 300 dots/inch is equivalent  to  a
80       region of 1950 columns x 2700 rows (see "g.region -p"). Any higher res‐
81       olution settings will make the output file larger, but with a  consumer
82       printer  you probably won't be able to resolve any better detail in the
83       hardcopy.
84
85       The user can specify negative or greater than 100 percentage values for
86       positioning  several  map  decorations  and embedded EPS-files, to move
87       them outside the current map box region (for example to position a cap‐
88       tion, barscale, or legend above or below the map box).
89
90       One "pixel" is 1/72 of an inch.
91
92       For  users  wanting to use special characters (such as accented charac‐
93       ters) it is important to note that  ps.map  uses  ISO-8859-1  encoding.
94       This  means that your instructions file will have to be encoded in this
95       encoding. If you normally work  in  a  different  encoding  environment
96       (such  as  UTF-8),  you  have  to transform your file to the ISO-8859-1
97       encoding, for example by using the iconv utility:
98       iconv -f UTF-8 -t ISO_8859-1 utf_file > iso_file
99
100

MAPPING INSTRUCTIONS

102       The mapping instructions allow the user to specify various spatial data
103       to  be  plotted.  These instructions are normally prepared in a regular
104       text file using a system editor.  Some  instructions  are  single  line
105       instructions while others are multiple line. Multiple line instructions
106       consist of the main instruction followed by a subsection of one or more
107       additional instructions and are terminated with an end instruction.
108
109   Instruction keywords:
110       [  border | colortable | comments | copies | eps | geogrid | greyrast |
111       grid | group | header | labels | line | mapinfo | maploc | maskcolor  |
112       outline | paper | point | psfile | raster | read | rectangle | region |
113       rgb | scale | scalebar | setcolor | text | vareas | vlines | vpoints  |
114       vlegend | end ]
115
116   Common instructions
117       Instructions  that may be included in the subsection under several dif‐
118       ferent main instructions are:
119
120       where x y
121              The top left corner of the bounding box of the item to be  plot‐
122              ted  is  located  x inches from the left edge of the paper and y
123              inches from the top edge of the paper. If  x  is  less  than  or
124              equal to zero, the default horizontal location is used.  If y is
125              less than or equal to zero, the  default  vertical  location  is
126              used.
127
128       font font name
129              The  name  of  the  PostScript font.  Fonts present in all Post‐
130              Script implementations are:  Times-Roman,  Times-Italic,  Times-
131              Bold, Times-BoldItalic, Helvetica, Helvetica-Oblique, Helvetica-
132              Bold, Helvetica-BoldOblique, Courier, Courier-Oblique,  Courier-
133              Bold, and Courier-BoldOblique.
134              The default is Helvetica.
135
136       fontsize font size
137              The  size  of  the PostScript font (in 1/72nds of an inch).  The
138              default is 10.
139
140       color name
141              The following colors names are accepted by ps.map: aqua,  black,
142              blue,  brown,  cyan, gray, grey, green, indigo, magenta, orange,
143              purple, red, violet, white, yellow
144              For vectors and some plotting  commands  you  can  also  specify
145              ’none' or 'R:G:B' (e.g '255:0:0').
146
147   Command usage

border

149       Controls the border which is drawn around the map area.
150       USAGE:  border [y|n]
151            color color
152            width #
153            end
154         The  color  may be either a standard GRASS color, a R:G:B triplet, or
155       "none". The width is specified in points, unless followed by an "i"  in
156       which case it is measured in inches.  The default is a black border box
157       of width 1 point.
158
159       The border can be turned off completely with the  "border  n"  instruc‐
160       tion. In this case the end command should not be given as the main com‐
161       mand will be treated as a single line instruction.
162
163       This example would create a grey border 0.1" wide.
164       EXAMPLE:
165            border
166            color grey
167            width 0.1i
168            end
169
170

colortable

172       Prints the color table for the raster map layer anywhere on the page.
173       USAGE:    colortable [y|n]
174            where x y
175            raster raster map
176            range minimum maximum
177            width table width
178            height table height (FP legend only)
179            cols table columns
180            font font name
181            fontsize font size
182            color text color
183            nodata [Y|n]
184            tickbar [y|N]
185            end
186        The color table will display the colors for each raster map layer cat‐
187       egory  value  and  the  category label.  If raster is omitted, the col‐
188       ortable defaults to a previously registered raster layer.  The legend's
189       range can be adjusted for floating point rasters, but if set beyond the
190       extent of the map's range be sure that you have set up color rules with
191       r.colors  which  cover  this  range.  The default location for the col‐
192       ortable is immediately below any other map legend information, starting
193       at  the  left  margin.   The default text color is black.  Omitting the
194       colortable instruction would result in no  color  table.  For  floating
195       point  legends  width  is width of color band only. height is used only
196       for floating point legend.  Adding the nodata n instruction  will  pre‐
197       vent  the "no data" box from being drawn (category based legends only).
198       Adding the tickbar y instruction will change the  tick  mark  style  so
199       that  ticks  are drawn across the color table instead of protruding out
200       to the right (floating point legends only).
201
202       Note:  Be careful about asking for color tables for raster  map  layers
203       which  have  many  categories, such as elevation.  This could result in
204       the printing of an extremely long color table!
205
206       Another issue is that the color table only  includes  categories  which
207       have a label. If there are only a few categories, you can use r.support
208       to manually add labels. If there are too many categories  to  do  this,
209       you could write a script to add dummy labels to the cats file
210       (///cats/).
211
212       If  the  colortable is turned off with a "colortable n" instruction the
213       end command should not be given as the main command will be treated  as
214       a single line instruction.
215
216       This  example would print a color table immediately below any other map
217       legend information, starting at the left margin, with 4 columns:
218       EXAMPLE:
219            colortable y
220               cols 4
221               width 4
222               end
223
224

comments

226       Prints comments anywhere on the page.
227       USAGE:    comments commentfile
228            where x y
229            font font name
230            fontsize font size
231            color text color
232            end
233        The default location is immediately below the last item item  printed,
234       starting at the left margin. The default text color is black.
235
236       If you wish to use parentheses spanning multiple lines you will need to
237       quote them with a backslash to prevent the PostScript interpreter  from
238       getting confused. e.g. '\(' and '\)'
239
240       This example prints in blue whatever is in the file veg.comments start‐
241       ing at 1.5 inches from the left edge of the page and 7.25  inches  from
242       the top of the page, using a 15/72 inch Helvetica Bold font.
243       EXAMPLE:
244            raster vegetation
245            comments veg.comments
246            where 1.5 7.25
247            font Helvetica Bold
248            fontsize 15
249            color blue
250            end
251         Presumably,  the file veg.comments contain comments pertaining to the
252       raster map layer vegetation, such as "This map was created by classify‐
253       ing a LANDSAT TM image".
254

copies

256       Specifies the number of copies to be printed.
257       USAGE:    copies n
258        Each page will be printed n times.
259
260       This instruction is identical to the copies command line parameter.
261

eps

263       Places EPS (Encapsulated PostScript) pictures on the output map.
264       USAGE:    eps east north
265            eps x% y%
266            epsfile EPS file
267            scale #
268            rotate #
269            masked [y|n]
270            end
271         The  EPS  picture location is entered in the main instruction line by
272       giving either the map coordinates or by using percentages of  the  geo‐
273       graphic  region.   The  EPS picture will be centered at the given posi‐
274       tion.  The user must specify full EPS file path epsfile.  The user  may
275       also  specify  the  scale of the icon (default is 1.0), the rotate i.e.
276       rotation in degrees (default is 0) and  whether  the  point  is  to  be
277       masked  by  the  current  mask.   (See manual entry for r.mask for more
278       information on the mask.)
279
280       This example would place  a  EPS  file  ./epsf/logo.eps  at  the  point
281       (E456000  N7890000).   This  picture would be rotated 20 degrees clock‐
282       wise, 3 times bigger than in original file and would not be  masked  by
283       the current mask.
284       EXAMPLE:
285            eps 456000 7890000
286            epsfile ./epsf/logo.eps
287            scale 3
288            rotate 20
289            masked n
290            end
291         Of  course,  multiple  EPS  pictures  may  be drawn with multiple eps
292       instructions.
293

geogrid

295       Overlays a geographic grid onto the output map.
296       USAGE:    geogrid spacing unit
297            color color
298            numbers # [color]
299            font font name
300            fontsize font size
301            width #
302            end
303        The spacing and spacing unit of the geographic grid is  given  on  the
304       main  instruction  line.   The  spacing  unit  is given as one of d for
305       degrees, m for minutes, and s for seconds.  The subsection instructions
306       allow  the  user  to  specify  the  color of the geographic grid lines,
307       whether coordinate numbers should appear on the geographic grid  lines,
308       the  width  of  the  lines (accepts decimal points [floating points] as
309       well as integers), and if they should appear every grid line (1), every
310       other  grid  line (2), etc., and what color the numbers should be.  The
311       defaults are black grid lines, unnumbered.
312
313       NOTE: The geogrid draws grid numbers on the east and south  borders  of
314       the map.
315
316       This  example would overlay a blue geographic grid with a spacing of 30
317       minutes onto the output map.  Alternate grid lines  would  be  numbered
318       with yellow numbers.
319       EXAMPLE:
320            geogrid 30 m
321            color blue
322            numbers 2 yellow
323            end
324
325

greyrast

327       Selects a raster map layer for output in shades of grey.
328       USAGE:    greyrast mapname
329        For each ps.map run, only one raster map layer can be requested (using
330       either the greyrast or the raster instruction).
331

grid

333       Overlays a coordinate grid onto the output map.
334       USAGE:    grid spacing
335            color color
336            numbers # [color]
337            cross cross size
338            font font name
339            fontsize font size
340            width #
341            end
342        The spacing of the grid is given (in the geographic coordinate  system
343       units) on the main instruction line.  The subsection instructions allow
344       the user to specify the color of the  grid  lines,  whether  coordinate
345       numbers  should  appear  on  the  grid lines, and if they should appear
346       every grid line (1), every other grid line (2), etc.,  and  what  color
347       the  numbers  should  be.   The  cross argument draws grid intersection
348       crosses instead of grid lines, with  cross  size  given  in  geographic
349       coordinate  system  units.   The  defaults are black grid lines, unnum‐
350       bered.
351
352       This example would overlay a green grid with a spacing of 10000  meters
353       (for a metered database, like UTM) onto the output map.  Alternate grid
354       lines would be numbered with red numbers.
355       EXAMPLE:
356            grid 10000
357            color green
358            numbers 2 red
359            end
360
361

group

363       Selects an RGB imagery group for output.
364       USAGE:    group groupname
365        This is similar to raster,  except  that  it  uses  an  imagery  group
366       instead  of a raster map layer. The group must contain three raster map
367       layers, comprising the red, green and blue bands of the image.
368
370       Prints the map header above the map.
371       USAGE:    header
372            file header file
373            font font name
374            fontsize font size
375            color text color
376            end
377        If the file sub-instruction is absent the header will consist  of  the
378       map's  title and the location's description.  The text will be centered
379       on the page above the map.  The default text color is black.
380
381       This example prints (in red) whatever is in the  file  soils.hdr  above
382       the map, using a 20/72 inch Courier font.
383       EXAMPLE:
384            header
385            file soils.hdr
386            font Courier
387            fontsize 20
388            color red
389            end
390
391

labels

393       Selects a labels file for output (see manual entry for v.label ).
394       USAGE:    labels  labelfile
395            font font name
396            end
397
398
399       NOTE:  ps.map  can  read  new  option 'ROTATE:' from labels file, which
400       specifies counter clockwise rotation in degrees.
401
402       This example would paint labels from the labels file called town.names.
403       Presumably, these labels would indicate the names of towns on the map.
404       EXAMPLE:
405            labels town.names
406            end
407
408

line

410       Draws lines on the output map.
411       USAGE:    line east north east north
412            line x% y% x% y%
413            color color
414            width #
415            masked [y|n]
416            end
417         The  beginning  and ending points of the line are entered on the main
418       instruction.  These points can be defined either by map coordinates  or
419       by using percentages of the geographic region.  The user may also spec‐
420       ify line color, width  in  pixels  (accepts  decimal  points  [floating
421       points]  as  well  as integers), and if the line is to be masked by the
422       current mask.  (See manual entry for r.mask
423        for more information on the mask.)
424
425       This example would draw a yellow line from the point x=10% y=80% to the
426       point  x=30%  y=70%.  This line would be 2 pixels wide and would appear
427       even if there is a mask.
428       EXAMPLE:
429            line 10% 80% 30% 70%
430            color yellow
431            width 2
432            masked n
433            end
434        Of course, multiple lines may be drawn  with  multiple  line  instruc‐
435       tions.
436

mapinfo

438       Prints  the  portion  of  the map legend containing the scale, grid and
439       region information, on or below the map.
440       USAGE:    mapinfo
441            where x y
442            font font name
443            fontsize font size
444            color text color
445            background box color|none
446            border color|none
447            end
448        The default location is immediately below the  map,  starting  at  the
449       left  edge  of  the map.  The default text color is black.  The default
450       background box color is white.
451
452       border will draw a border around the legend using the specified  color.
453       (see NAMED COLORS)
454
455       This  example  prints (in brown) the scale, grid and region information
456       immediately below the map and starting 1.5 inches from the left edge of
457       the page, using a 12/72 inch Courier font.
458       EXAMPLE:
459            mapinfo
460            where 1.5 0
461            font Courier
462            fontsize 12
463            color brown
464            end
465
466

maploc

468       Positions the map on the page.
469       USAGE:    maploc  x y [width height]
470         The upper left corner of the map will be positioned x inches from the
471       left edge of the page and y inches from the top of the page.  If  width
472       and height (in inches) are present, the map will be rescaled, if neces‐
473       sary, to fit.
474
475       This example positions the upper left corner of the map 2.0 inches from
476       the left edge and 3.5 inches from the top edge of the map.
477       EXAMPLE:
478            maploc 2.0 3.5
479
480

maskcolor

482       Color to be used for mask.
483       USAGE:    maskcolor  color
484
485

outline

487       Outlines the areas of a raster map layer with a specified color.
488       USAGE:    outline
489            color  color
490            width  width of line in pixels
491            end
492         Distinct  areas  of  the raster map will be separated from each other
493       visually by drawing a  border  (or  outline)  in  the  specified  color
494       (default:  black). For width the program accepts decimal points [float‐
495       ing points] as well as integers.  Note: it is important the user  enter
496       the  instruction  end even if a color is not chosen.  (It is hoped that
497       in the future the outline of a different raster map  layer  other  than
498       the one currently being painted may be placed on the map.)
499
500       This  example  would outline the category areas of the soils raster map
501       layer in grey.
502       EXAMPLE:
503            raster soils
504            outline
505            color grey
506            width 2
507            end
508
509

paper

511       Specifies paper size and margins.
512       USAGE:    paper paper name
513            height #
514            width #
515            left #
516            right #
517            bottom #
518            top #
519            end
520        paper may select predefined  paper  name  (a4,a3,a2,a1,a0,us-legal,us-
521       letter,us-tabloid).  Default paper size is a4. The measures are defined
522       in inches.  left, right, bottom and top are paper margins.  If the plot
523       is  rotated  with the -r command line flag, measures are applied to the
524       rotated page.
525
526
527       EXAMPLE:
528            paper a3
529            end
530
531
532
533       EXAMPLE:
534            paper
535            width 10
536            height 10
537            left 2
538            right 2
539            bottom 2
540            top 2
541            end
542
543

point

545       Places additional points or icons on the output map.
546       USAGE:    point east north
547            point x% y%
548            color color
549            fcolor color
550            symbol symbol group/name
551            size #
552            rotate #
553            masked [y|n]
554            end
555        The point location is entered in the main instruction line  by  giving
556       either  the  map  coordinates or by using percentages of the geographic
557       region.  The user may also specify the point color, the size of  symbol
558       in  points,  the rotation angle (in degrees CCW), and whether the point
559       is to be masked by the current mask.  (See manual entry for  r.mask
560        for more information on the mask.)
561
562       This example would place a purple diamond (from icon file  diamond)  at
563       the  point (E456000 N7890000).  This diamond would be the the size of a
564       15 points and would not be masked by the current mask.
565       EXAMPLE:
566            point 456000 7890000
567            fcolor purple
568            color black
569            symbol basic/diamond
570            size 15
571            masked n
572            end
573        Of course, multiple points may be drawn with multiple  point  instruc‐
574       tions.
575

psfile

577       Copies a file containing PostScript commands into the output file.
578
579       Note:  ps.map  will  not search for this file.  The user must be in the
580       correct directory or specify the full path on the  psfile  instruction.
581       (Note to /bin/csh users: ~ won't work with this instruction).
582       USAGE:    psfile filename
583        This example copies the file "logo.ps" into the output file.
584       EXAMPLE:
585            psfile logo.ps
586
587

raster

589       Selects a raster map layer for output.
590       USAGE:    raster mapname
591         For  each  ps.map run, only one raster map layer (or set of layers or
592       imagery group; see below) can be requested. If no raster map  layer  is
593       requested, a completely white map will be produced. It can be useful to
594       select no raster map layer in order to provide a white  background  for
595       vector maps.
596
597       Note  that an imagery group selected with the group option, or a set of
598       three raster layers selected with the rgb option, count as a raster map
599       layer for the purposes of the preceding paragraph.
600
601       This example would paint a map of the raster map layer soils.
602       EXAMPLE:
603            raster soils
604
605

read

607       Provides ps.map with a previously prepared input stream.
608       USAGE:    read previously prepared UNIX file
609        Mapping instructions can be placed into a file and read into ps.map.
610
611       Note:  ps.map  will  not search for this file.  The user must be in the
612       correct directory or specify the full path  on  the  read  instruction.
613       (Note to /bin/csh users: ~ won't work with this instruction).
614
615       This example reads the UNIX file pmap.roads into ps.map.  This file may
616       contain all the ps.map instructions for placing the  vector  map  layer
617       roads onto the output map.
618       EXAMPLE:
619            read pmap.roads
620         The  user may have created this file because this vector map layer is
621       particularly useful for many ps.map outputs.  By using the read option,
622       the  user  need not enter all the input for the vector instruction, but
623       simply read the previously prepared file with the correct instructions.
624

rectangle

626       Draws rectangle on the output map.
627       USAGE:    rectangle east north east north
628            rectangle x% y% x% y%
629            color color
630            fcolor fill color
631            width #
632            masked [y|n]
633            end
634        The two corners of the rectangle are entered on the main  instruction.
635       These  points can be defined either by map coordinates or by using per‐
636       centages of the geographic region.  The  user  may  also  specify  line
637       color,  fill  color  fcolor,  width  in  pixels (accepts decimal points
638       [floating points] as well as integers), and if the rectangle is  to  be
639       masked  by  the  current  mask.   (See manual entry for r.mask for more
640       information on the mask.)
641       Multiple rectangles may be drawn by using multiple  rectangle  instruc‐
642       tions.
643
644       This  example  would  draw  a yellow rectangle filled by green from the
645       point x=10% y=80% to the point x=30% y=70%. This line would be 2 pixels
646       wide and would appear even if there is a mask.
647       EXAMPLE:
648            rectangle 10% 80% 30% 70%
649            color yellow
650            fcolor green
651            width 2
652            masked n
653            end
654
655

region

657       Places the outline of a smaller geographic region on the output.
658       USAGE:    region regionfile
659            color color
660            width #
661            end
662         Geographic  region settings are created and saved using  the g.region
663       module.  The ps.map region option can be used to show an outline  of  a
664       smaller  region  which was printed on a separate run of ps.map on other
665       user-created maps.
666
667       The user can specify the color and the width in  pixel  units  (accepts
668       decimal  points  [floating points] as well as integers) of the outline.
669       The default is a black border of one pixel width.
670
671       This example would place a white outline, 2 pixels wide,  of  the  geo‐
672       graphic  region called fire.zones onto the output map.  This geographic
673       region would have been created and saved using g.region.
674       EXAMPLE:
675            region fire.zones
676            color white
677            width 2
678            end
679
680

rgb

682       Selects three raster map layers for output as an RGB color image.
683       USAGE:    rgb red green blue
684        This is similar to raster, except that it uses three raster map layers
685       instead  of  a  single  layer.  The three layers are composed to form a
686       color image, similar to d.rgb.
687
688       For each layer, only one of the components of the layer's  color  table
689       is  used:  the  red  component for the red layer, and so on.  This will
690       give the desired result if all of the layers have  a  grey-scale  color
691       table,  or  if each layer's color table uses the hue appropriate to the
692       layer.
693

scale

695       Selects a scale for the output map.
696       USAGE:    scale scale
697        The scale can be selected either as:
698
699
700              a relative ratio, e.g. 1:25000;
701
702
703              an absolute width of the printed map, e.g. 10 inches;
704
705
706              the number of printed paper panels, e.g. 3  panels  .I  (at  the
707              present time, only 1 panel is supported);
708
709
710              the number of miles per inch, e.g. 1 inch equals 4 miles.
711
712       This example would set the scale of the map to 1 unit = 25000 units.
713       EXAMPLE:
714            scale 1:25000
715
716
717       This instruction is identical to the scale command line parameter.
718       NOTE:  Using  "scale"  from  the  command line is depreciated and while
719       still provided for compatibility reasons it  will  be  removed  in  the
720       future.  Please use the "scale" mapping instruction instead.
721

scalebar

723       Draws a scalebar on the map.
724       USAGE:    scalebar [f|s]
725            where x y
726            length scale length
727            height scale height
728            segment no. segments
729            numbers #
730            fontsize font size
731            background [Y|n]
732            end
733        Draw one of two types of scale bar.  Fancy (f) draws alternating black
734       and white scale boxes.  Simple  (s)  draws  a  plain  line  scale.  The
735       default  type  is fancy.  The subsection instructions allow the user to
736       set where the scalebar is placed, the length of the scalebar  (in  geo‐
737       graphic coordinate system units), the height of the scalebar in inches,
738       and the number of segments (or tics for simple). The number of  annota‐
739       tions  numbers every n-th segment.  The background command can turn off
740       the background box for the text.
741
742       The scalebar length is the only required argument. The defaults  are  a
743       fancy  scalebar  with 4 segments, each segment labeled, and a height of
744       0.1 inches. The default location is 2 inches from the top of  the  page
745       and halfway across.
746
747       NOTE: The scalebar is centered on the location given.
748
749       This  example  draws a simple scalebar 1000 meters (for a metered data‐
750       base, like UTM) long, with tics every 200 meters, labeled every  second
751       tic.  The scalebar is drawn 5 inches from the top and 4 inches from the
752       left and is 0.25 inches high.
753       EXAMPLE:
754            scalebar s
755            where 4 5
756            length 1000
757            height 0.25
758            segment 5
759            numbers 2
760            end
761
762

setcolor

764       Overrides the color assigned to one or more categories  of  the  raster
765       map layer.
766       USAGE:    setcolor cat(s) color
767         This  example  would  set  the  color for categories 2,5 and 8 of the
768       raster map layer watersheds to white and category 10 to green.   (NOTE:
769       no spaces are inserted between the category values.)
770       EXAMPLE:
771            raster watersheds
772            setcolor 2,5,8 white
773            setcolor 10 green
774         Of  course,  setcolor can be requested more than once to override the
775       default color for additional categories.  More than one category can be
776       changed  for  each request by listing all the category values separated
777       by commas (but with no spaces).
778

text

780       Places text on the map.
781       USAGE:    text  east north text
782            text  x% y% text
783            font fontname
784            color color|none
785            width #
786            hcolor color|none
787            hwidth #
788            background color|none
789            border color|none
790            fontsize font size
791            size #
792            ref reference point
793            rotate degrees CCW
794            xoffset #
795            yoffset #
796            opaque [y|n]
797            end
798        The user specifies where the text will  be  placed  by  providing  map
799       coordinates  or percentages of the geographic region.  The text follows
800       these coordinates on the same instruction line.  More than one line  of
801       text  can  be  specified  by  notating  the end of a line with \n (e.g.
802       USA\nCERL).
803
804       The user can then specify various text features:
805
806       font: the PostScript font. Common possibilities are listed at the start
807       of this help page. The default is Helvetica.
808
809       color (see NAMED COLORS);
810
811       width  of  the  lines  used  to  draw  the text to make thicker letters
812       (accepts decimal points [floating points] as well as integers);
813
814       size and fontsize.  size gives the vertical height of  the  letters  in
815       meters  on  the  ground (text size will grow or shrink depending on the
816       scale at which the map is painted). Alternatively fontsize can set  the
817       font  size  directly.  If  neither size or fontsize is given, a default
818       font size of 10 will be used;
819
820       the highlight color (hcolor) and  the  width  of  the  highlight  color
821       (hwidth);
822
823       the text-enclosing-box background color; the text box border color;
824
825       ref.  This reference point specifies the text handle - what part of the
826       text should be placed on the location specified by the map coordinates.
827       Reference points can refer to: [lower|upper|center] [left|right|center]
828       of the text to be printed; The default is center center, i.e  the  text
829       is centered on the reference point.
830
831       rotate sets the text rotation angle, measured in degrees counter-clock‐
832       wise.
833
834       yoffset, which provides finer placement of text by shifting the text  a
835       vertical  distance  in  pixels  from the specified north.  The vertical
836       offset will shift the location to the south if positive, north if nega‐
837       tive;
838
839       xoffset, which shifts the text a horizontal distance in pixels from the
840       specified east The horizontal offset will shift the  location  east  if
841       positive, west if negative;
842
843       opaque,  whether or not the text should be opaque to vectors.  Entering
844       no to the opaque option will allow the user to see any vectors which go
845       through  the  text's  background  box.  Otherwise, they will end at the
846       box's edge.
847
848       The following example would place the text SPEARFISH LAND COVER at  the
849       coordinates  E650000  N7365000.  The  text would be a total of 3 pixels
850       wide (2 pixels of red text and 1 pixel black highlight), have  a  white
851       background enclosed in a red box, and be 500 meters in size.  The lower
852       right corner of the text would be centered over  the  coordinates  pro‐
853       vided.  All vectors on the map would stop at the border of this text.
854       EXAMPLE:
855            text 650000 7365000 SPEARFISH LAND COVER
856            font romand
857            color red
858            width 2
859            hcolor black
860            hwidth 1
861            background white
862            border red
863            size 500
864            ref lower left
865            opaque y
866            end
867
868

vareas

870       Selects a vector map layer for output and plots areas.
871       USAGE:    vareas vectormap
872            layer # (layer number used with cats/where option)
873            cats list of categories (e.g. 1,3,5-7)
874            where SQL where statement
875            masked [y|n]
876            color color
877            fcolor color
878            rgbcolumn column
879            width #
880            label label to use in legend
881            lpos position in legend
882            pat pattern file
883            pwidth #
884            scale #
885            end
886        The user can specify:
887
888       color - color of the vector lines or area boundaries;
889
890       fcolor - the area fill color;
891
892       rgbcolumn  -  name  of  color  definition column used for the area fill
893       color;
894
895       width - width of  the  vectors  lines  or  area  boundaries  in  pixels
896       (accepts decimal points [floating points] as well as integers);
897
898       masked  -  whether  or  not the raster map layer is to be masked by the
899       current mask; (see manual entry r.mask  for  more  information  on  the
900       mask)
901
902       cats - which categories should be plotted (default is all);
903
904       where  -  select  features  using  a SQL where statement.  For example:
905       vlastnik = 'Cimrman';
906
907       label - for description in vlegend.  Default is: map(mapset);
908
909       lpos - position vector is plotted in legend. If lpos  is  0  then  this
910       vector  is  omitted  in legend. If more vectors used the same lpos then
911       their symbols in legend are merged and label for first vector is used.
912
913       pat - full path to pattern file. The pattern file contains  header  and
914       simple  PostScript  commands.  It  is  similar to EPS but more limited,
915       meaning that while each pattern file is a true EPS file, most EPS files
916       are  not  useful  as pattern files because they contain restricted com‐
917       mands. Color and width of patterns are set by fcolor (red, green,  ...,
918       none,  R:G:B) and width until overwritten in the pattern file.  Pattern
919       may be scaled with the scale command. Several  standard  hatching  pat‐
920       terns  are  provided  in  $GISBASE/etc/paint/patterns/.   Demonstrative
921       images can be found on the GRASS Wiki site.  You can also  create  your
922       own custom pattern files in a text editor.  Example of pattern file:
923       %!PS-Adobe-2.0 EPSF-1.2
924       %%BoundingBox: 0 0 10 10
925       newpath
926       5 0 moveto
927       5 10 lineto
928       stroke
929
930
931       scale - pattern scale
932
933       pwidth  -  pattern line width, width is used by pattern until the width
934       is overwritten in pattern file.
935
936
937       EXAMPLE:
938            vareas forest
939            color blue
940            width 1
941            masked y
942            cats 2,5-7
943            end
944
945

vlines

947       Selects a vector map layer for output and plots lines.
948       USAGE:    vlines vectormap
949            type line and/or boundary
950            layer # (layer number used with cats/where option)
951            cats list of categories (e.g. 1,3,5-7)
952            where SQL where statement like: vlastnik = 'Cimrman'
953            masked [y|n]
954            color color
955            rgbcolumn column
956            width #
957            cwidth #
958            hcolor color
959            hwidth #
960            offset #
961            coffset #
962            ref left|right
963            style  0-9
964            label label
965            lpos #
966            end
967        The user can specify:
968
969       color - color of the vector lines or area boundaries;
970
971       rgbcolumn - name of color definition column used for the  vector  lines
972       or area boundaries;
973
974       width  -  width  of  the  vectors  lines  or  area boundaries in pixels
975       (accepts decimal points [floating points] as well as integers);
976
977       cwidth - width of the vectors lines. If cwidth is used  then  width  of
978       line is equal to cwidth * category value and width is used in legend;
979
980       hcolor - the highlight color for the vector lines;
981
982       hwidth - the width of the highlight color in pixels;
983
984       offset  (experimental)  -  offset  for  the vectors lines in pixels for
985       plotting parallel lines in distance equal to offset  (accepts  positive
986       or  negative decimal points). Useful to print streets with several par‐
987       allel lanes;
988
989       coffset (experimental) - offset for the vectors lines.  If  coffset  is
990       used  then offset of line is equal to coffset * category value and off‐
991       set is used in legend;
992
993       ref (experimental) - line justification.
994
995       masked - whether or not the raster map layer is to  be  masked  by  the
996       current  mask;  (see  manual  entry  r.mask for more information on the
997       mask);
998
999       style - the line style allows the vectors to  be  dashed  in  different
1000       patterns.   This is done by typing a series of numbers (0's and 1's) in
1001       a desired sequence or pattern.  Blanks  and  non-digit  characters  are
1002       recognized  as  0's.  Using  0 would allow the colors of the raster map
1003       layer (or the background color if no raster map layer was selected)  to
1004       show through;
1005
1006       cats - which categories should be plotted (default is all);
1007
1008       label - for description in vlegend.  Default is: map(mapset);
1009
1010       lpos  -  position  vector  is plotted in legend. If lpos is 0 then this
1011       vector is omitted in legend. If more vectors used the  same  lpos  then
1012       their symbols in legend are merged and label for first vector is used.
1013
1014
1015       EXAMPLE:
1016            vlines streams
1017            color blue
1018            width 2
1019            hcolor white
1020            hwidth 1
1021            masked y
1022            cats 2
1023            label Streams - category 2
1024            end
1025
1026

vpoints

1028       Selects vector point data to be placed on the output map
1029       USAGE:    vpoints vectormap
1030            type point and/or centroid
1031            layer # (layer number used with cats/where/sizecol options)
1032            cats list of categories (e.g. 1,3,5-7)
1033            where SQL where statement like: vlastnik = 'Cimrman'
1034            masked [y|n]
1035            color color
1036            fcolor color
1037            rgbcolumn column
1038            width #
1039            eps epsfile
1040            symbol symbol group/name
1041            size #
1042            sizecolumn attribute column used for symbol sizing
1043            scale scaling factor for sizecolumn values
1044            rotate #
1045            rotatecolumn column
1046            label legend label
1047            lpos position in legend
1048            end
1049         The user may specify the the color of the sites (see section on NAMED
1050       COLORS); either the GRASS symbol or  the  eps  Encapsulated  Postscript
1051       file  to be used to represent the presence of a site (if '$' is used in
1052       the EPS file path it will be replaced by category number);  and  rotate
1053       (in degrees) for counter-clockwise rotation.
1054       The size of the icon (number of times larger than the size it is in the
1055       icon file) is typically given by the  size  option.  Alternatively  the
1056       size of the symbol or EPS graphic can be taken from an attribute column
1057       by using the sizecolumn command. The value given by sizecolumn  may  be
1058       scaled  by using the scale factor setting (default scaling is 1.0).  In
1059       a similar manner symbol color can be read from rgbcolumn and the  rota‐
1060       tion angle read from rotatecolumn.
1061       EXAMPLE:
1062            vpoints windmills
1063            color blue
1064            symbol mills/windmill
1065            size 10
1066            end
1067
1068

vlegend

1070       Prints the portion of the map legend containing the vector information,
1071       on or below the map.
1072       USAGE:    vlegend
1073            where x y
1074            font font name
1075            fontsize font size
1076            width width of color symbol
1077            cols number of columns to print
1078            border color|none
1079            end
1080        The default location is immediately below the  legend  containing  the
1081       scale,  grid  and  region information, starting at the left edge of the
1082       map.  If the where instruction is present and y is less than  or  equal
1083       to  zero,  the  vector  legend will be positioned immediately below the
1084       map, starting x inches from the left edge of the page.
1085
1086       width is the width in inches of the color symbol (for areas)  in  front
1087       of the legend text. The default is 1/24 * fontsize inches.  cols is the
1088       number of columns to split the legend into. The default is one  column.
1089       The  maximum  number  of colums is 10, or equal to the number of legend
1090       entries if there are less than 10 entries.
1091
1092       border will draw a border around the legend using the specified  color.
1093       (see NAMED COLORS)
1094
1095       Alternatively,  the user can create a custom legend by using the point,
1096       and text instructions.
1097
1098       This example prints the vector legend immediately  below  the  map  and
1099       starting  4.5 inches from the left edge of the page, using a 12/72 inch
1100       Helvetica font.
1101       EXAMPLE:
1102            vlegend
1103            where 4.5 0
1104            font Courier
1105            fontsize 12
1106            end
1107
1108

end

1110       Terminates input and begin painting the map.
1111       USAGE:    end
1112
1113

EXAMPLE ps.map INPUT FILE

1115       The following is an example of a ps.map script file. The file has  been
1116       named  spear.soils.   This  script  file  can be entered at the command
1117       line:
1118         ps.map input=spear.soils output=soils.ps
1119
1120       # this ps.map example draws a map of Spearfish, SD
1121       raster soils
1122       outline
1123          color black
1124          width 1
1125          end
1126       comments soil.cmt
1127          where 1 6
1128          font Helvetica
1129          end
1130       colortable y
1131          where 1 6.5
1132          cols 4
1133          width 4
1134          font Helvetica
1135          end
1136       setcolor 6,8,9 white
1137       setcolor 10 green
1138       vlines roads
1139          width 2
1140          style 0111
1141          color grey
1142          masked n
1143          end
1144       vlegend
1145          where 4.5 0
1146          font Courier
1147          fontsize 8
1148          end
1149       text 30% 100% SPEARFISH SOILS MAP
1150          color red
1151          width 1
1152          hcolor black
1153          hwidth 1
1154          background white
1155          border red
1156          size 500
1157          ref lower left
1158          end
1159       line 606969.73 3423092.91 616969.73 3423092.91
1160          color yellow
1161          width 2
1162          end
1163       point 40% 60%
1164          color purple
1165          symbol basic/diamond
1166          size 25
1167          masked n
1168          end
1169       scale 1:125000
1170       scalebar f
1171          where 4.5 6.5
1172          length 5000
1173          height 0.05
1174          segment 5
1175          numbers 5
1176          end
1177       geogrid 60 s
1178          color blue
1179          numbers 2 yellow
1180          end
1181       paper a4
1182           end
1183       end
1184
1185
1186       More examples can be found on the GRASS Wiki help site.
1187

CHANGES BETWEEN VERSION 5.0.x/5.4.x and 6.0

1189              Devices and ps.select do not exist any more. Paper is defined by
1190              the  paper  instruction.   vpoints  are  used  instead  of sites
1191              (points  are  read  from  vector).   vector  is  substituted  by
1192              vpoints,  vlines  and vareas.  Symbols are used instead of icons
1193              (different format and directory).  Map legend can be printed  in
1194              columns.
1195

SEE ALSO

1197        g.region, v.label
1198

AUTHOR

1200       Paul Carlson, USDA, SCS, NHQ-CGIS
1201       Modifications: Radim Blazek, Glynn Clements, Bob Covill, Hamish Bowman
1202
1203       Last changed: $Date: 2008-02-01 04:39:19 +0100 (Fri, 01 Feb 2008) $
1204
1205       Full index
1206
1207       © 2003-2008 GRASS Development Team
1208
1209
1210
1211GRASS 6.3.0                                                          ps.map(1)
Impressum