ps.map.html 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643
  1. <h2>DESCRIPTION</h2>
  2. <em>ps.map</em> is a cartographic mapping program for producing high quality
  3. hardcopy maps in PostScript format. Output can include a raster map, any
  4. number of vector overlays, text labels, decorations, and other spatial data.
  5. <p>A file of mapping instructions that describes the various spatial and textual
  6. information to be printed must be prepared prior to running <em>ps.map</em>.
  7. <h2>NOTES</h2>
  8. The order of commands is generally unimportant but may affect how some layers
  9. are drawn. For example to plot <b>vpoints</b> above <b>vareas</b> list the
  10. <b>vpoints</b> entry first. Raster maps are always drawn first, and only a
  11. single raster map (or 3 if part of a RGB group) may be used.
  12. <p>The hash character ('<tt>#</tt>') may be used at the beginning of a line
  13. to indicate that the line is a comment. Blank lines will also be ignored.
  14. <p>Be aware that some mapping instructions require the <i>end</i> command
  15. and some do not. Any instruction that allows subcommands will require
  16. it, any instruction that does not allow subcommands will not.
  17. <p>The resolution and extent of raster maps plotted with <em>ps.map</em> are
  18. controlled by the current region settings via the
  19. <a href="g.region.html">g.region</a> module. The output filesize is largely
  20. a function of the region resolution, so special care should be taken
  21. if working with large raster datasets. For example if the desired output is
  22. US-Letter sized paper at 600dpi, with 1" margins and the raster filling the
  23. entire page, the usable area on the page will be 6.5" x 9", which at 600
  24. dots/inch is equivalent to a region of 3900 columns x 5400 rows (see
  25. "<tt>g.region -p</tt>"). Any higher resolution settings will make the
  26. output file larger, but with a consumer printer you probably won't be able
  27. to resolve any better detail in the hardcopy.
  28. <p>The user can specify negative or greater than 100 percentage values for
  29. positioning several map decorations and embedded EPS-files, to move them
  30. outside the current map box region (for example to position a caption,
  31. barscale, or legend above or below the map box).
  32. <p>One point ("pixel") is 1/72 of an inch.
  33. <p>For users wanting to use special characters (such as accented characters) it
  34. is important to note that <em>ps.map</em> uses <tt>ISO-8859-1</tt> encoding.
  35. This means that your instructions file will have to be encoded in this
  36. encoding. If you normally work in a different encoding environment (such as
  37. <tt>UTF-8</tt>), you have to transform your file to the <tt>ISO-8859-1</tt>
  38. encoding, for example by using the <tt>iconv</tt> utility:
  39. <div class="code"><pre>
  40. iconv -f UTF-8 -t ISO_8859-1 utf_file > iso_file
  41. </pre></div>
  42. <p><p>
  43. <h2>MAPPING INSTRUCTIONS</h2>
  44. The mapping instructions allow the user to specify various spatial data
  45. to be plotted. These instructions are normally prepared in a regular
  46. text file using a system editor. Some instructions are single line
  47. instructions while others are multiple line. Multiple line instructions
  48. consist of the main instruction followed by a subsection of one or more
  49. additional instructions and are terminated with an <i>end</i> instruction.
  50. <p>
  51. <h3>Instruction keywords:</h3>
  52. [
  53. <a href="#border">border</a>&nbsp;|
  54. <a href="#colortable">colortable</a>&nbsp;|
  55. <a href="#comments">comments</a>&nbsp;|
  56. <a href="#copies">copies</a>&nbsp;|
  57. <a href="#eps">eps</a>&nbsp;|
  58. <a href="#geogrid">geogrid</a>&nbsp;|
  59. <a href="#greyrast">greyrast</a>&nbsp;|
  60. <a href="#grid">grid</a>&nbsp;|
  61. <a href="#group">group</a>&nbsp;|
  62. <a href="#header">header</a>&nbsp;|
  63. <a href="#labels">labels</a>&nbsp;|
  64. <a href="#line">line</a>&nbsp;|
  65. <a href="#mapinfo">mapinfo</a>&nbsp;|
  66. <a href="#maploc">maploc</a>&nbsp;|
  67. <a href="#maskcolor">maskcolor</a>&nbsp;|
  68. <a href="#outline">outline</a>&nbsp;|
  69. <a href="#paper">paper</a>&nbsp;|
  70. <a href="#point">point</a>&nbsp;|
  71. <a href="#psfile">psfile</a>&nbsp;|
  72. <a href="#raster">raster</a>&nbsp;|
  73. <a href="#read">read</a>&nbsp;|
  74. <a href="#rectangle">rectangle</a>&nbsp;|
  75. <a href="#region">region</a>&nbsp;|
  76. <a href="#rgb">rgb</a>&nbsp;|
  77. <a href="#scale">scale</a>&nbsp;|
  78. <a href="#scalebar">scalebar</a>&nbsp;|
  79. <a href="#setcolor">setcolor</a>&nbsp;|
  80. <a href="#text">text</a>&nbsp;|
  81. <a href="#vareas">vareas</a>&nbsp;|
  82. <a href="#vlines">vlines</a>&nbsp;|
  83. <a href="#vpoints">vpoints</a>&nbsp;|
  84. <a href="#vlegend">vlegend</a>&nbsp;|
  85. <a href="#end">end</a>
  86. ]
  87. <h3>Common instructions</h3>
  88. Instructions that may be included in the subsection under several
  89. different main instructions are:
  90. <dl>
  91. <dt><b>where</b> <em>x y</em>
  92. <dd>The top left corner of the bounding box of the item to be plotted
  93. is located <em>x</em> inches from the left edge of the paper and
  94. <em>y</em> inches from the top edge of the paper. If <em>x</em> is less than
  95. or equal to zero, the default horizontal location is used. If <em>y</em>
  96. is less than or equal to zero, the default vertical location is used.
  97. <dt><b>font</b> <em>font name</em>
  98. <dd>The name of the PostScript font.
  99. Fonts present in all PostScript implementations are:
  100. <tt>
  101. Times-Roman,
  102. Times-Italic,
  103. Times-Bold,
  104. Times-BoldItalic,
  105. Helvetica,
  106. Helvetica-Oblique,
  107. Helvetica-Bold,
  108. Helvetica-BoldOblique,
  109. Courier,
  110. Courier-Oblique,
  111. Courier-Bold,
  112. and
  113. Courier-BoldOblique</tt>.
  114. <br>
  115. The default is Helvetica.
  116. </dd>
  117. <dt><b>fontsize</b> <em>font size</em>
  118. <dd>The size of the PostScript font (in 1/72nds of an inch).
  119. The default is 10 point.
  120. </dd>
  121. <dt><a name="NAMED_COLORS"></a><b>color</b> <em>name</em>
  122. <dd>The following colors names are accepted by <em>ps.map</em>:
  123. <tt>
  124. aqua,
  125. black,
  126. blue,
  127. brown,
  128. cyan,
  129. gray,
  130. grey,
  131. green,
  132. indigo,
  133. magenta,
  134. orange,
  135. purple,
  136. red,
  137. violet,
  138. white,
  139. yellow
  140. </tt>.
  141. <br><br>
  142. For vectors and some plotting commands you can also specify
  143. '<tt>none</tt>' or '<tt>R:G:B</tt>' (e.g '<tt>255:0:0</tt>').
  144. </dd>
  145. <dt><b>yes|no</b>
  146. <dd>For options that take a yes or no answer, you can simply use the
  147. letters "y" or "n", or type out the full words "Yes" or "No" if you
  148. prefer. It is not case-sensitive. Typically the option with have a
  149. default answer and you only need to specify one if you wish to
  150. override it.
  151. </dd>
  152. </dl>
  153. <p><br>
  154. <h3>Command usage</h3>
  155. <a name="border"></a>
  156. <h2>border</h2>
  157. Controls the border which is drawn around the map area.
  158. <div class="code"><pre>
  159. USAGE: <b>border</b> [y|n]
  160. <b>color</b> color
  161. <b>width</b> #
  162. <b>end</b>
  163. </pre></div>
  164. The <b>color</b> may be either a standard GRASS color, a R:G:B triplet,
  165. or "none". The width is specified in points, unless followed by an "i"
  166. in which case it is measured in inches.
  167. The default is a black border box of width 1 point.
  168. <p>The border can be turned off completely with the
  169. &quot;<tt>border&nbsp;n</tt>&quot; instruction. In this case
  170. the <b>end</b> command should not be given as the
  171. main command will be treated as a single line instruction.
  172. <p>
  173. This example would create a grey border 0.1&quot; wide.
  174. <div class="code"><pre>
  175. EXAMPLE:
  176. <b>border</b>
  177. <b>color</b> grey
  178. <b>width</b> 0.1i
  179. <b>end</b>
  180. </pre></div>
  181. <p>
  182. <a name="colortable"></a>
  183. <h2>colortable</h2>
  184. Prints the color table legend for the raster map layer anywhere on the page.
  185. <div class="code"><pre>
  186. USAGE: <b>colortable</b> [y|n]
  187. <b>where</b> x y
  188. <b>raster</b> raster map
  189. <b>range</b> minimum maximum
  190. <b>width</b> table width
  191. <b>height</b> table height (FP legend only)
  192. <b>cols</b> table columns
  193. <b>font</b> font name
  194. <b>fontsize</b> font size
  195. <b>color</b> text color
  196. <b>nodata</b> [Y|n]
  197. <b>tickbar</b> [y|N]
  198. <b>discrete</b> [y|n]
  199. <b>end</b>
  200. </pre></div>
  201. For a categorical (CELL) map the color table will create a legend displaying
  202. the colors for each of a raster map's category values along with its
  203. associated category label. For a floating point (FCELL or DCELL) map a
  204. continuous gradient legend will be created.
  205. <p>
  206. If <b>raster</b> is omitted, the colortable defaults to the previously
  207. registered raster layer.
  208. <p>
  209. The default location for the colortable is immediately below any other
  210. map legend information, starting at the left margin.
  211. The default text color is black.
  212. <p>
  213. Omitting the <b>colortable</b> instruction would result in no color table.
  214. If the colortable is turned off with a &quot;<tt>colortable&nbsp;N</tt>&quot;
  215. instruction the <b>end</b> command should not be given as the
  216. main command will be treated as a single line instruction.
  217. <p>
  218. See also the <a href="#vlegend">vlegend</a> command for creating vector map
  219. legends.
  220. <h3>Categorical (CELL) Maps</h3>
  221. Adding the <b>nodata N</b> instruction will prevent the "no data" box
  222. from being drawn (category based legends only). If you have manually
  223. added a "no data" label to the cats/ file it will be shown regardless.
  224. <p>
  225. <b>Note</b>: Be careful about asking for color tables for integer
  226. raster map layers which have many categories, such as elevation.
  227. This could result in the printing of an extremely long color table!
  228. In this situation it is useful to use the <b>discrete N</b> instruction
  229. to force a continuous color gradient legend.
  230. <p>
  231. Be aware that the color table only includes categories which
  232. have a label. You can use the <em>r.category</em> module to add labels.
  233. <h3>Floating point (FCELL and DCELL) Maps</h3>
  234. The legend's <b>range</b> can be adjusted for floating point rasters, but if
  235. set beyond the extent of the map's range be sure that you have set up color
  236. rules with <em>r.colors</em> which cover this range.
  237. If the map has been given a data-units label with <em>r.support</em>
  238. then this label will be displayed.
  239. <!-- bonus prize for code explorers: you can switch the label placement by
  240. editing the label_posn variable in ps.map/ps_fclrtbl.c -->
  241. For floating point legends <b>width</b> is width of color
  242. band only. <b>height</b> is used only for floating point legend.
  243. A horizontal gradient legend can be achieved by setting the legend
  244. width greater than its height.
  245. Adding the <b>tickbar Y</b> instruction will change the tick mark style
  246. so that ticks are drawn across the color table instead of protruding out
  247. to the right (floating point legends only).
  248. Adding the <b>discrete Y</b> instruction will command the program to treat
  249. the map as a categorical map. In this way the legend can be created with
  250. discrete range bands instead of a continuous gradient. You must use the
  251. <em>r.category</em> or <em>r.support</em> module to set up the range labels
  252. first.
  253. <br>
  254. <p>This example would print a color table immediately below any other map legend
  255. information, starting at the left margin, with 4 columns:
  256. <div class="code"><pre>
  257. EXAMPLE:
  258. <b>colortable</b> y
  259. <b>cols</b> 4
  260. <b>width</b> 4
  261. <b>end</b>
  262. </pre></div>
  263. <p>
  264. <a name="comments"></a>
  265. <h2>comments</h2>
  266. Prints comments anywhere on the page.
  267. <div class="code"><pre>
  268. USAGE: <b>comments</b> commentfile
  269. <b>where</b> x y
  270. <b>font</b> font name
  271. <b>fontsize</b> font size
  272. <b>color</b> text color
  273. <b>end</b>
  274. </pre></div>
  275. The default location is immediately below the last item item printed,
  276. starting at the left margin. The default text color is black.
  277. <p>If you wish to use parentheses spanning multiple lines you will need to
  278. quote them with a backslash to prevent the PostScript interpreter from
  279. getting confused. e.g. '<b><tt>\(</tt></b>' and '<b><tt>\)</tt></b>'
  280. <p>
  281. This example prints in blue
  282. whatever is in the file <em>veg.comments</em> starting at
  283. 1.5 inches from the left edge of the page and 7.25 inches from the top of
  284. the page, using a 15/72 inch Helvetica Bold font.
  285. <div class="code"><pre>
  286. EXAMPLE:
  287. <b>raster</b> vegetation
  288. <b>comments</b> veg.comments
  289. <b>where</b> 1.5 7.25
  290. <b>font</b> Helvetica Bold
  291. <b>fontsize</b> 15
  292. <b>color</b> blue
  293. <b>end</b>
  294. </pre></div>
  295. Presumably, the file
  296. <em>veg.comments</em>
  297. contain comments
  298. pertaining to the raster map layer <em>vegetation</em>,
  299. such as "This map was created by classifying a LANDSAT TM image".
  300. <p>
  301. <a name="copies"></a>
  302. <h2>copies</h2>
  303. Specifies the number of copies to be printed.
  304. <div class="code"><pre>
  305. USAGE: <b>copies</b> n
  306. </pre></div>
  307. Each page will be printed n times.
  308. <p>This instruction is identical to the <em>copies</em> command line parameter.
  309. <p>
  310. <a name="eps"></a>
  311. <h2>eps</h2>
  312. Places EPS (Encapsulated PostScript) pictures on the output map.
  313. <div class="code"><pre>
  314. USAGE: <b>eps</b> east north
  315. <b>eps</b> x% y%
  316. <b>epsfile</b> EPS file
  317. <b>scale</b> #
  318. <b>rotate</b> #
  319. <b>masked</b> [y|n]
  320. <b>end</b>
  321. </pre></div>
  322. The EPS picture location is entered in the main
  323. instruction line by giving either the map
  324. coordinates or by using percentages of the geographic region.
  325. The EPS picture will be <i>centered</i> at the given position.
  326. The user must specify full EPS file path <b>epsfile</b>.
  327. The user may also specify the <b>scale</b> of the icon
  328. (default is 1.0), the <b>rotate</b> i.e. rotation in degrees
  329. (default is 0)
  330. and whether the point is to be <b>masked</b>
  331. by the current mask.
  332. (See manual entry for <em><a href="r.mask.html">r.mask</a></em>
  333. for more information on the mask.)
  334. <p>
  335. This example would place a EPS file ./epsf/logo.eps
  336. at the point (E456000 N7890000). This picture would be
  337. rotated 20 degrees clockwise, 3 times bigger than
  338. in original file and would not be masked by the current mask.
  339. <div class="code"><pre>
  340. EXAMPLE:
  341. <b>eps</b> 456000 7890000
  342. <b>epsfile</b> ./epsf/logo.eps
  343. <b>scale</b> 3
  344. <b>rotate</b> 20
  345. <b>masked</b> n
  346. <b>end</b>
  347. </pre></div>
  348. Of course, multiple EPS pictures may be drawn with multiple
  349. <em>eps</em>
  350. instructions.
  351. <p>
  352. <a name="geogrid"></a>
  353. <h2>geogrid</h2>
  354. Overlays a geographic grid onto the output map.
  355. <div class="code"><pre>
  356. USAGE: <b>geogrid</b> spacing unit
  357. <b>color</b> color
  358. <b>numbers</b> # [color]
  359. <b>font</b> font name
  360. <b>fontsize</b> font size
  361. <b>width</b> #
  362. <b>end</b>
  363. </pre></div>
  364. The <b>spacing</b> and spacing unit of the geographic grid is given
  365. on the main instruction line. The <b>spacing</b> unit is given as one of <b>d</b> for
  366. degrees, <b>m</b> for minutes, and <b>s</b> for seconds.
  367. The subsection instructions allow the user to specify
  368. the <b>color</b> of the geographic grid lines,
  369. whether coordinate <b>numbers</b> should appear
  370. on the geographic grid lines, the <b>width</b>
  371. of the lines (accepts decimal points [floating points]
  372. as well as integers), and
  373. if they should appear every grid line (1), every other grid line
  374. (2), etc., and what color the numbers should be. The defaults are
  375. black grid lines, unnumbered.
  376. <p>
  377. NOTE: The <b>geogrid</b> draws grid numbers on the east and south borders of the map.
  378. <p>
  379. This example would overlay a blue geographic grid with a spacing of 30 minutes
  380. onto the output map. Alternate grid
  381. lines would be numbered with yellow numbers.
  382. <div class="code"><pre>
  383. EXAMPLE:
  384. <b>geogrid</b> 30 m
  385. <b>color</b> blue
  386. <b>numbers</b> 2 yellow
  387. <b>end</b>
  388. </pre></div>
  389. <p>
  390. <a name="greyrast"></a>
  391. <h2>greyrast</h2>
  392. Selects a raster map layer for output in shades of grey.
  393. <div class="code"><pre>
  394. USAGE: <b>greyrast</b> mapname
  395. </pre></div>
  396. For each
  397. <em>ps.map</em>
  398. run, only one raster map layer can be requested (using either the
  399. <em>greyrast</em> or the <em>raster</em> instruction).
  400. <p>
  401. <a name="grid"></a>
  402. <h2>grid</h2>
  403. Overlays a coordinate grid onto the output map.
  404. <div class="code"><pre>
  405. USAGE: <b>grid</b> spacing
  406. <b>color</b> color
  407. <b>numbers</b> # [color]
  408. <b>cross</b> cross size
  409. <b>font</b> font name
  410. <b>fontsize</b> font size
  411. <b>width</b> #
  412. <b>end</b>
  413. </pre></div>
  414. The <b>spacing</b> of the grid is given (in the geographic coordinate
  415. system units) on the main instruction line. The subsection instructions
  416. allow the user to specify
  417. the <b>color</b> of the grid lines,
  418. whether coordinate <b>numbers</b> should appear
  419. on the grid lines, and if they
  420. should appear every grid line (1), every other grid line
  421. (2), etc., and what color the numbers should be.
  422. The <b>cross</b> argument draws grid intersection crosses instead of grid lines,
  423. with cross size given in geographic coordinate system units.
  424. The defaults are black grid lines, unnumbered.
  425. <p>
  426. This example would overlay a green grid with a spacing of 10000 meters
  427. (for a metered database, like UTM) onto the output map. Alternate grid
  428. lines would be numbered with red numbers.
  429. <div class="code"><pre>
  430. EXAMPLE:
  431. <b>grid</b> 10000
  432. <b>color</b> green
  433. <b>numbers</b> 2 red
  434. <b>end</b>
  435. </pre></div>
  436. <p>
  437. <a name="group"></a>
  438. <h2>group</h2>
  439. Selects an RGB imagery group for output.
  440. <div class="code"><pre>
  441. USAGE: <b>group</b> <em>groupname</em>
  442. </pre></div>
  443. This is similar to <em>raster</em>, except that it uses an imagery group
  444. instead of a raster map layer. The group must contain three raster map
  445. layers, comprising the red, green and blue bands of the image.
  446. <p>
  447. <a name="header"></a>
  448. <h2>header</h2>
  449. Prints the map header above the map.
  450. <div class="code"><pre>
  451. USAGE: <b>header</b>
  452. <b>file</b> header file
  453. <b>font</b> font name
  454. <b>fontsize</b> font size
  455. <b>color</b> text color
  456. <b>end</b>
  457. </pre></div>
  458. If the <em>file</em> sub-instruction is absent the header will consist
  459. of the map's title <!-- from hist file -->
  460. and the location's description.<!-- PERMANENT/MYNAME -->
  461. The text will be centered on the page above the map.
  462. The default text color is black.
  463. <p>If the <em>file</em> sub-instruction is given the header will consist
  464. of the text in the text file specified, with some special formatting keys:
  465. <ul>
  466. <li><tt>%%</tt> - a literal %
  467. <li><tt>%n</tt> - ? newline ?
  468. <li><tt>%_</tt> - horizontal bar
  469. <li><tt>%c</tt> - "&lt;raster name&gt; in mapset &lt;mapset name&gt;"
  470. <li><tt>%d</tt> - today's date
  471. <li><tt>%l</tt> - location name
  472. <li><tt>%L</tt> - Location's text description
  473. <li><tt>%m</tt> - mapset name
  474. <li><tt>%u</tt> - user name
  475. <li><tt>%x</tt> - mask info
  476. <li><tt>%-</tt> - advance to this character column number (see example below)
  477. </ul>
  478. Example header file:
  479. <div class="code"><pre>
  480. %_
  481. LOCATION: %-27l DATE: %d
  482. MAPSET: %-27m USER: %u
  483. RASTER MAP: %c
  484. MASK: %x
  485. %_
  486. Produced by: US Army CERL, Champaign Illinois
  487. Software: GRASS
  488. %_
  489. </pre></div>
  490. <p>
  491. This example prints (in red) whatever is in the file <em>soils.hdr</em> above
  492. the map, using a 20/72 inch <tt>Courier</tt> font.
  493. <div class="code"><pre>
  494. EXAMPLE:
  495. <b>header</b>
  496. <b>file</b> soils.hdr
  497. <b>font</b> Courier
  498. <b>fontsize</b> 20
  499. <b>color</b> red
  500. <b>end</b>
  501. </pre></div>
  502. <p>
  503. <a name="labels"></a>
  504. <h2>labels</h2>
  505. Selects a labels file for output (see manual entry for
  506. <em>
  507. <a href="v.label.html">v.label</a>
  508. ).</em>
  509. <div class="code"><pre>
  510. USAGE: <b>labels</b> labelfile
  511. <b>font</b> font name
  512. <b>end</b>
  513. </pre></div>
  514. <p>NOTE: ps.map can read new option 'ROTATE:' from labels file, which
  515. specifies counter clockwise rotation in degrees.
  516. <p>This example would paint labels from the labels file called
  517. <em>town.names</em>. Presumably, these labels would indicate the names of
  518. towns on the map.
  519. <div class="code"><pre>
  520. EXAMPLE:
  521. <b>labels</b> town.names
  522. <b>end</b>
  523. </pre></div>
  524. <p>
  525. <a name="line"></a>
  526. <h2>line</h2>
  527. Draws lines on the output map.
  528. <div class="code"><pre>
  529. USAGE: <b>line</b> east north east north
  530. <b>line</b> x% y% x% y%
  531. <b>color</b> color
  532. <b>width</b> #
  533. <b>masked</b> [y|n]
  534. <b>end</b>
  535. </pre></div>
  536. The beginning and ending points of the line are entered on the main
  537. instruction. These points can be defined either by map coordinates or
  538. by using percentages of the geographic region.
  539. The user may also specify line <b>color</b>, <b>width</b>
  540. in points (1/72"; accepts decimal values as well as integers),
  541. and if the line is to be <b>masked</b> by the current mask.
  542. (See manual entry for <em><a href="r.mask.html">r.mask</a>
  543. </em> for more information on the mask.)
  544. The line <b>width</b> (if given) is measured in points; an <i>i</i>
  545. directly following the number indicates that the width is given in
  546. inches instead.
  547. <p>
  548. This example would draw a yellow line from the point x=10% y=80%
  549. to the point x=30% y=70%.
  550. This line would be 2 points wide (2/72") and would appear even if
  551. there is a mask.
  552. <div class="code"><pre>
  553. EXAMPLE:
  554. <b>line</b> 10% 80% 30% 70%
  555. <b>color</b> yellow
  556. <b>width</b> 2
  557. <b>masked</b> n
  558. <b>end</b>
  559. </pre></div>
  560. Of course, multiple lines may be drawn with multiple
  561. <em>line</em>
  562. instructions.
  563. <p>
  564. <a name="mapinfo"></a>
  565. <h2>mapinfo</h2>
  566. Prints the portion of the map legend containing the scale, grid and
  567. region information, on or below the map.
  568. <div class="code"><pre>
  569. USAGE: <b>mapinfo</b>
  570. <b>where</b> x y
  571. <b>font</b> font name
  572. <b>fontsize</b> font size
  573. <b>color</b> text color
  574. <b>background</b> box color|none
  575. <b>border</b> color|none
  576. <b>end</b>
  577. </pre></div>
  578. The default location is immediately below the map,
  579. starting at the left edge of the map.
  580. The default text color is black.
  581. The default background box color is white.
  582. <p><em>border</em> will draw a border around the legend using the specified color.
  583. (see <a href="#NAMED_COLORS">NAMED COLORS</a>)
  584. <p>
  585. This example prints (in brown) the scale, grid and region information
  586. immediately below the map and starting 1.5 inches from the left edge
  587. of the page, using a 12/72 inch <tt>Courier</tt> font.
  588. <div class="code"><pre>
  589. EXAMPLE:
  590. <b>mapinfo</b>
  591. <b>where</b> 1.5 0
  592. <b>font</b> Courier
  593. <b>fontsize</b> 12
  594. <b>color</b> brown
  595. <b>end</b>
  596. </pre></div>
  597. <p>
  598. <a name="maploc"></a>
  599. <h2>maploc</h2>
  600. Positions the map on the page.
  601. <div class="code"><pre>
  602. USAGE: <b>maploc</b> x y [width height]
  603. </pre></div>
  604. The upper left corner of the map will be positioned <em>x</em> inches from
  605. the left edge of the page and <em>y</em> inches from the top of the page.
  606. If <em>width</em> and <em>height</em> (in inches) are present, the map will be
  607. rescaled, if necessary, to fit.
  608. <p>
  609. This example positions the upper left corner of the map 2.0 inches from
  610. the left edge and 3.5 inches from the top edge of the map.
  611. <div class="code"><pre>
  612. EXAMPLE:
  613. <b>maploc</b> 2.0 3.5
  614. </pre></div>
  615. <p>
  616. <a name="maskcolor"></a>
  617. <h2>maskcolor</h2>
  618. Color to be used for mask.
  619. <div class="code"><pre>
  620. USAGE: <b>maskcolor</b> color
  621. </pre></div>
  622. <a name="outline"></a>
  623. <h2>outline</h2>
  624. Outlines the areas of a raster map layer with a specified color.
  625. <div class="code"><pre>
  626. USAGE: <b>outline</b>
  627. <b>color</b> color
  628. <b>width</b> width of line in points
  629. <b>end</b>
  630. </pre></div>
  631. Distinct areas of the raster map will be separated from each other visually
  632. by drawing a border (or outline) in the specified
  633. <b>color</b>
  634. (default: black). For
  635. <b>width</b>
  636. the program accepts decimal points [floating points] as well as integers.
  637. Note: it is
  638. important the user enter the instruction <b>end</b> even if a color is not
  639. chosen.
  640. (It is hoped that in the future the outline of a different raster map
  641. layer other than the one currently being painted may be placed on the map.)
  642. <p>
  643. This example would outline the category areas of the
  644. <em>soils</em>
  645. raster map layer
  646. in grey.
  647. <div class="code"><pre>
  648. EXAMPLE:
  649. <b>raster</b> soils
  650. <b>outline</b>
  651. <b>color</b> grey
  652. <b>width</b> 2
  653. <b>end</b>
  654. </pre></div>
  655. <p>
  656. <a name="paper"></a>
  657. <h2>paper</h2>
  658. Specifies paper size and margins.
  659. <div class="code"><pre>
  660. USAGE: <b>paper</b> paper name
  661. <b>height</b> #
  662. <b>width</b> #
  663. <b>left</b> #
  664. <b>right</b> #
  665. <b>bottom</b> #
  666. <b>top</b> #
  667. <b>end</b>
  668. </pre></div>
  669. <b>paper</b> may select predefined paper name
  670. (a4,a3,a2,a1,a0,us-legal,us-letter,us-tabloid).
  671. Default paper size is a4. The measures are defined in <em>inches</em>.
  672. <b>left</b>, <b>right</b>, <b>bottom</b> and <b>top</b> are paper margins.
  673. If the plot is rotated with the <b>-r</b> command line flag, measures
  674. are applied to the <em>rotated</em> page.
  675. <p>
  676. <div class="code"><pre>
  677. EXAMPLE:
  678. <b>paper</b> a3
  679. <b>end</b>
  680. </pre></div>
  681. <p>
  682. <div class="code"><pre>
  683. EXAMPLE:
  684. <b>paper</b>
  685. <b>width</b> 10
  686. <b>height</b> 10
  687. <b>left</b> 2
  688. <b>right</b> 2
  689. <b>bottom</b> 2
  690. <b>top</b> 2
  691. <b>end</b>
  692. </pre></div>
  693. <p>
  694. <a name="point"></a>
  695. <h2>point</h2>
  696. Places additional points or icons on the output map.
  697. <div class="code"><pre>
  698. USAGE: <b>point</b> east north
  699. <b>point</b> x% y%
  700. <b>color</b> color
  701. <b>fcolor</b> color
  702. <b>symbol</b> symbol group/name
  703. <b>size</b> #
  704. <b>width</b> #
  705. <b>rotate</b> #
  706. <b>masked</b> [y|n]
  707. <b>end</b>
  708. </pre></div>
  709. The point location is entered in the main instruction line by giving either
  710. the map coordinates or by using percentages of the geographic region.
  711. The user may also specify the point <b>color</b>,
  712. the <b>size</b> of symbol in points,
  713. the rotation angle (in degrees CCW),
  714. and whether the point is to be <b>masked</b> by the current mask.
  715. (See manual entry for <em> <a href="r.mask.html">r.mask</a>
  716. </em> for more information on the mask.)
  717. The symbol line <b>width</b> (if given) is measured in points; an <i>i</i>
  718. directly following the number indicates that the width is given in inches
  719. instead. If a <b>width</b> is not given it will be set proportional to the
  720. symbol size.
  721. <p>This example would place a purple diamond (from icon file
  722. <em>diamond</em>) at the point (E456000 N7890000). This diamond would be the
  723. the size of a 15 points and would not be masked by the current mask.
  724. <div class="code"><pre>
  725. EXAMPLE:
  726. <b>point</b> 456000 7890000
  727. <b>fcolor</b> purple
  728. <b>color</b> black
  729. <b>symbol</b> basic/diamond
  730. <b>size</b> 15
  731. <b>masked</b> n
  732. <b>end</b>
  733. </pre></div>
  734. Of course, multiple points may be drawn with multiple
  735. <em>point</em>
  736. instructions.
  737. <p>
  738. <a name="psfile"></a>
  739. <h2>psfile</h2>
  740. Copies a file containing PostScript commands into the output file.
  741. <p>
  742. <b>Note:</b>
  743. <em>ps.map</em>
  744. will not search for this file. The user must be in the
  745. correct directory or specify the full path on the <b>psfile</b> instruction.
  746. (Note to /bin/csh users: ~ won't work with this instruction).
  747. <div class="code"><pre>
  748. USAGE: <b>psfile</b> filename
  749. </pre></div>
  750. This example copies the file "logo.ps" into the output file.
  751. <div class="code"><pre>
  752. EXAMPLE:
  753. <b>psfile</b> logo.ps
  754. </pre></div>
  755. <p>
  756. <a name="raster"></a>
  757. <h2>raster</h2>
  758. Selects a raster map layer for output.
  759. <div class="code"><pre>
  760. USAGE: <b>raster</b> mapname
  761. </pre></div>
  762. For each <em>ps.map</em> run, only one raster map layer (or set
  763. of layers or imagery group; see below) can be requested. If no
  764. raster map layer is requested, a completely white map will be
  765. produced. It can be useful to select no raster map layer in
  766. order to provide a white background for vector maps.
  767. <p>Note that an imagery group selected with the <em>group</em>
  768. option, or a set of three raster layers selected with the
  769. <em>rgb</em> option, count as a raster map layer for the
  770. purposes of the preceding paragraph.
  771. <p>The PostScript file's internal title will be set to the raster map's
  772. title, which in turn may be set with the <em>r.support</em> module.
  773. <p>This example would paint a map of the raster map layer <em>soils</em>.
  774. <div class="code"><pre>
  775. EXAMPLE:
  776. <b>raster</b> soils
  777. </pre></div>
  778. <p>
  779. <a name="read"></a>
  780. <h2>read</h2>
  781. Provides <em>ps.map</em> with a previously prepared input stream.
  782. <div class="code"><pre>
  783. USAGE: <b>read</b> previously prepared UNIX file
  784. </pre></div>
  785. Mapping instructions can be placed into a file and read into
  786. <em>ps.map.</em>
  787. <p>
  788. <b>Note:</b>
  789. <em>ps.map</em>
  790. will not search for this file. The user must be in the
  791. correct directory or specify the full path on the <b>read</b> instruction.
  792. (Note to /bin/csh users: ~ won't work with this instruction).
  793. <p>
  794. This example reads the UNIX file <em>pmap.roads</em> into <em>ps.map</em>.
  795. This file may contain all the <em>ps.map</em> instructions for placing
  796. the vector map layer <em>roads</em> onto the output map.
  797. <div class="code"><pre>
  798. EXAMPLE:
  799. <b>read</b> pmap.roads
  800. </pre></div>
  801. The user may have created this file because this vector map layer
  802. is particularly useful for many <em>ps.map</em>
  803. outputs. By using the <b>read</b> option, the user need not enter all the input
  804. for the <b>vector</b> instruction, but simply <b>read</b> the previously prepared
  805. file with the correct instructions.
  806. <p>
  807. <a name="rectangle"></a>
  808. <h2>rectangle</h2>
  809. Draws rectangle on the output map.
  810. <div class="code"><pre>
  811. USAGE: <b>rectangle</b> east north east north
  812. <b>rectangle</b> x% y% x% y%
  813. <b>color</b> color
  814. <b>fcolor</b> fill color
  815. <b>width</b> #
  816. <b>masked</b> [y|n]
  817. <b>end</b>
  818. </pre></div>
  819. The two corners of the rectangle are entered on the main
  820. instruction. These points can be defined either by map coordinates or
  821. by using percentages of the geographic region.
  822. The user may also specify line
  823. <b>color</b>, fill color <b>fcolor</b>, <b>width</b>
  824. in points (accepts decimal points [floating points] as well as integers),
  825. and if the rectangle is to be <b>masked</b> by the current mask.
  826. (See manual entry for <em><a href="r.mask.html">r.mask</a></em>
  827. for more information on the mask.)
  828. The border line <b>width</b> (if given) is measured in points; an <i>i</i>
  829. directly following the number indicates that the width is given in inches
  830. instead.
  831. <br>
  832. Multiple rectangles may be drawn by using multiple <em>rectangle</em> instructions.
  833. <p>
  834. This example would draw a yellow rectangle filled by green from the point x=10% y=80%
  835. to the point x=30% y=70%.
  836. The border line would be 1/16" wide and would appear even if there is a mask.
  837. <div class="code"><pre>
  838. EXAMPLE:
  839. <b>rectangle</b> 10% 80% 30% 70%
  840. <b>color</b> yellow
  841. <b>fcolor</b> green
  842. <b>width</b> 0.0625i
  843. <b>masked</b> n
  844. <b>end</b>
  845. </pre></div>
  846. <p>
  847. <a name="region"></a>
  848. <h2>region</h2>
  849. Places the outline of a smaller geographic region
  850. on the output.
  851. <div class="code"><pre>
  852. USAGE: <b>region</b> regionfile
  853. <b>color</b> color
  854. <b>width</b> #
  855. <b>end</b>
  856. </pre></div>
  857. Geographic region settings are created and saved using <em> the
  858. <a href="g.region.html">g.region</a></em> module.
  859. The <em>ps.map</em> <em>region</em> option can be used to show an outline of
  860. a smaller region which was printed on a separate run of <em>ps.map</em>
  861. on other user-created maps.
  862. <p>The user can specify the <b>color</b>
  863. and the <b>width</b> in point units (accepts decimal points
  864. [floating points] as well as integers) of the outline.
  865. The default is a black border of one point width (1/72").
  866. <p>This example would place a white outline, 2 points wide, of the
  867. geographic region called <em>fire.zones</em> onto the output map.
  868. This geographic region would have been created and saved using
  869. <em><a href="g.region.html">g.region</a></em>.
  870. <div class="code"><pre>
  871. EXAMPLE:
  872. <b>region</b> fire.zones
  873. <b>color</b> white
  874. <b>width</b> 2
  875. <b>end</b>
  876. </pre></div>
  877. <p>
  878. <a name="rgb"></a>
  879. <h2>rgb</h2>
  880. Selects three raster map layers for output as an RGB color image.
  881. <div class="code"><pre>
  882. USAGE: <b>rgb</b> <em>red</em> <em>green</em> <em>blue</em>
  883. </pre></div>
  884. This is similar to <em>raster</em>, except that it uses three
  885. raster map layers instead of a single layer. The three layers
  886. are composed to form a color image, similar to <em>d.rgb</em>.
  887. <p>
  888. For each layer, only one of the components of the layer's color
  889. table is used: the red component for the red layer, and so on.
  890. This will give the desired result if all of the layers have a
  891. grey-scale color table, or if each layer's color table uses the
  892. hue appropriate to the layer.
  893. <p>
  894. <a name="scale"></a>
  895. <h2>scale</h2>
  896. Selects a scale for the output map.
  897. <div class="code"><pre>
  898. USAGE: <b>scale</b> <em>scale</em>
  899. </pre></div>
  900. The scale can be selected either as:
  901. <dl>
  902. <dt>
  903. <dd>a relative ratio, e.g. 1:25000;
  904. <dt>
  905. <dd>an absolute width of the printed map, e.g. 10 inches;
  906. <dt>
  907. <dd>the number of printed paper panels, e.g. 3 panels
  908. <em>.I</em>
  909. (at the present time, only 1 panel is supported);
  910. <dt>
  911. <dd>the number of miles per inch, e.g. 1 inch equals 4 miles.
  912. </dd>
  913. </dl>
  914. <p>
  915. This example would set the scale of the map to 1 unit = 25000
  916. units.
  917. <div class="code"><pre>
  918. EXAMPLE:
  919. <b>scale</b> 1:25000
  920. </pre></div>
  921. <p>
  922. <a name="scalebar"></a>
  923. <h2>scalebar</h2>
  924. Draws a scalebar on the map.
  925. <div class="code"><pre>
  926. USAGE: <b>scalebar</b> [f|s]
  927. <b>where</b> x y
  928. <b>length</b> overall distance in map units
  929. <b>units</b> [auto|meters|kilometers|feet|miles|nautmiles]
  930. <b>height</b> scale height in inches
  931. <b>segment</b> number of segments
  932. <b>numbers</b> #
  933. <b>fontsize</b> font size
  934. <b>background</b> [Y|n]
  935. <b>end</b>
  936. </pre></div>
  937. Draw one of two types of scale bar.
  938. Fancy (f) draws alternating black and white scale boxes.
  939. Simple (s) draws a plain line scale. The default type is fancy.
  940. The subsection instructions allow the user to set <b>where</b> the scalebar
  941. is placed, the <b>length</b> of the scalebar (in geographic coordinate
  942. system units, or those given by <b>units</b>),
  943. <!-- bonus prize for code explorers: you can use km and nm abbreviations
  944. for kilometers and nautmiles units -->
  945. the <b>height</b> of the scalebar in inches, and the number of
  946. <b>segments</b> (or tics for simple). The <b>number</b> of annotations
  947. numbers every n-th segment.
  948. The <b>background</b> command can turn off the background box for the text.
  949. <p>The scalebar <b>length</b> is the only required argument. The defaults are a
  950. fancy scalebar with 4 segments, each segment labeled, and a height of 0.1
  951. inches. The default location is 2 inches from the top of the page and
  952. halfway across.
  953. <p>NOTE: The scalebar is centered on the location given.
  954. <p>This example draws a simple scalebar 1000 meters (for a metered database,
  955. like UTM) long, with tics every 200 meters, labeled every second tic.
  956. The scalebar is drawn 5 inches from the top and 4 inches from the left
  957. and is 0.25 inches high.
  958. <div class="code"><pre>
  959. EXAMPLE:
  960. <b>scalebar</b> s
  961. <b>where</b> 4 5
  962. <b>length</b> 1000
  963. <b>height</b> 0.25
  964. <b>segment</b> 5
  965. <b>numbers</b> 2
  966. <b>end</b>
  967. </pre></div>
  968. <a name="setcolor"></a>
  969. <h2>setcolor</h2>
  970. Overrides the color assigned to one or more categories
  971. of the raster map layer.
  972. <div class="code"><pre>
  973. USAGE: <b>setcolor</b> cat(s) color
  974. </pre></div>
  975. This example would set the color for categories 2,5 and 8 of the raster
  976. map layer <em>watersheds</em> to white and category 10 to green.
  977. (<b>NOTE</b>: no spaces are inserted between the category values.)
  978. <div class="code"><pre>
  979. EXAMPLE:
  980. <b>raster</b> watersheds
  981. <b>setcolor</b> 2,5,8 white
  982. <b>setcolor</b> 10 green
  983. </pre></div>
  984. Of course, <em>setcolor</em>
  985. can be requested more than once to override the default color for additional
  986. categories. More than one category can be changed for each request by listing
  987. all the category values separated by commas (but with no spaces). Also ranges
  988. can be included, for example "1,2,6-10,12". Colors for "<tt>null</tt>" and the
  989. "<tt>default</tt>" (i.e. out-of-range) color may also be reassigned.
  990. <p>
  991. <a name="text"></a>
  992. <h2>text</h2>
  993. Places text on the map.
  994. <div class="code"><pre>
  995. USAGE: <b>text</b> east north text
  996. <b>text</b> x% y% text
  997. <b>font</b> fontname
  998. <b>color</b> color|none
  999. <b>width</b> #
  1000. <b>hcolor</b> color|none
  1001. <b>hwidth</b> #
  1002. <b>background</b> color|none
  1003. <b>border</b> color|none
  1004. <b>fontsize</b> font size
  1005. <b>size</b> #
  1006. <b>ref</b> reference point
  1007. <b>rotate</b> degrees CCW
  1008. <b>xoffset</b> #
  1009. <b>yoffset</b> #
  1010. <b>opaque</b> [y|n]
  1011. <b>end</b>
  1012. </pre></div>
  1013. The user specifies where the text will be placed by
  1014. providing map coordinates or percentages of the geographic region.
  1015. The text follows these coordinates on the same instruction line.
  1016. More than one line of text can be specified by notating the end of a line with
  1017. <b>\n</b>
  1018. (e.g. USA<b>\n</b>CERL).
  1019. <p>The user can then specify various text features:
  1020. <p><b>font:</b>
  1021. the PostScript font. Common possibilities are listed at the start of this
  1022. help page. The default is <tt>Helvetica</tt>.
  1023. <p><b>color</b>
  1024. (see <a href="#NAMED_COLORS">NAMED COLORS</a>);
  1025. <p><b>width</b>
  1026. of the lines used to draw the text to make thicker letters
  1027. (accepts decimal points [floating points] as well as integers);
  1028. <p><b>size</b> and <b>fontsize.</b>&nbsp;
  1029. <b>size</b> gives the vertical height of the letters in meters on the
  1030. ground (text size will grow or shrink depending on the scale at which
  1031. the map is painted). Alternatively <b>fontsize</b> can set the font
  1032. size directly. If neither <b>size</b> or <b>fontsize</b> is given, a
  1033. default font size of 10 will be used;
  1034. <p>the highlight color (<b>hcolor</b>) and
  1035. the width of the highlight color (<b>hwidth</b>);
  1036. <p>the text-enclosing-box <b>background</b> color;
  1037. the text box <b>border</b> color;
  1038. <p><b>ref.</b>
  1039. This reference point specifies the text handle - what
  1040. part of the text should be placed on the location specified by the map
  1041. coordinates. Reference points can refer to:
  1042. [lower|upper|center] [left|right|center] of the text to be printed;
  1043. The default is center center, i.e. the text is centered on the reference point.
  1044. <p><b>rotate</b>
  1045. sets the text rotation angle, measured in degrees counter-clockwise.
  1046. <p><b>yoffset</b>,
  1047. which provides finer placement of text by shifting the
  1048. text a vertical distance in points (1/72") from the specified north.
  1049. The vertical offset will shift the location to the south if positive,
  1050. north if negative;
  1051. <p><b>xoffset</b>,
  1052. which shifts the text a horizontal distance in points from
  1053. the specified east The horizontal offset will shift the location east if
  1054. positive, west if negative;
  1055. <p><b>opaque</b>,
  1056. whether or not the text should be <b>opaque</b> to vectors. Entering <b>no</b>
  1057. to the opaque option will allow the user to see any vectors which go
  1058. through the text's background box. Otherwise, they will end at the box's edge.
  1059. <p><br>
  1060. The following example would place the text <em>SPEARFISH LAND COVER</em>
  1061. at the coordinates E650000 N7365000. The text would be a total of
  1062. 3 points wide (2 pixels of red text and 1 pixel black highlight), have a white
  1063. background enclosed in a red box, and be 500 meters in size. The lower right
  1064. corner of the text would be centered over the coordinates provided. All
  1065. vectors on the map would stop at the border of this text.
  1066. <div class="code"><pre>
  1067. EXAMPLE:
  1068. <b>text</b> 650000 7365000 SPEARFISH LAND COVER
  1069. <b>font</b> romand
  1070. <b>color</b> red
  1071. <b>width</b> 2
  1072. <b>hcolor</b> black
  1073. <b>hwidth</b> 1
  1074. <b>background</b> white
  1075. <b>border</b> red
  1076. <b>size</b> 500
  1077. <b>ref</b> lower left
  1078. <b>opaque</b> y
  1079. <b>end</b>
  1080. </pre></div>
  1081. <p>
  1082. <a name="vareas"></a>
  1083. <h2>vareas</h2>
  1084. Selects a vector map layer for output and plots areas.
  1085. <div class="code"><pre>
  1086. USAGE: <b>vareas</b> vectormap
  1087. <b>layer</b> # (layer number used with cats/where option)
  1088. <b>cats</b> list of categories (e.g. 1,3,5-7)
  1089. <b>where</b> SQL where statement
  1090. <b>masked</b> [y|n]
  1091. <b>color</b> color
  1092. <b>fcolor</b> color
  1093. <b>rgbcolumn</b> column
  1094. <b>width</b> #
  1095. <b>label</b> label to use in legend
  1096. <b>lpos</b> position in legend
  1097. <b>pat</b> pattern file
  1098. <b>pwidth</b> #
  1099. <b>scale</b> #
  1100. <b>end</b>
  1101. </pre></div>
  1102. The user can specify:
  1103. <p><b>color</b> - color of the vector lines or area boundaries;
  1104. <p><b>fcolor</b> - the area fill color;
  1105. <p><b>rgbcolumn</b> - name of color definition column used for the area fill color;
  1106. <p><b>width</b> - width of the vectors lines or area boundaries in points
  1107. (accepts decimal points [floating points] as well as integers);
  1108. <p><b>masked</b> - whether or not the raster map layer is to be masked
  1109. by the current mask;
  1110. (see manual entry <em><a href="r.mask.html">r.mask</a></em>
  1111. for more information on the mask)
  1112. <p><b>cats</b> - which categories should be plotted (default is all);
  1113. <p><b>where</b> - select features using a SQL where statement.
  1114. For example: <tt>vlastnik = 'Cimrman'</tt>;
  1115. <p><b>label</b> - for description in <a href="#vlegend">vlegend</a>.
  1116. Default is: map(mapset);
  1117. <p><b>lpos</b> - position vector is plotted in legend. If lpos is
  1118. 0 then this vector is omitted in legend. If more vectors used the
  1119. same lpos then their symbols in legend are merged and label for
  1120. first vector is used.
  1121. <p><b>pat</b> - full path to pattern file. The pattern file contains header and
  1122. simple PostScript commands. It is similar to EPS but more limited, meaning that
  1123. while each pattern file is a true EPS file, most EPS files are not useful as pattern
  1124. files because they contain restricted commands. Color <!-- and width --> of patterns
  1125. are set by <b>fcolor</b> (red, green, ..., none, R:G:B)<!-- no? and <b>width</b>
  1126. until overwritten in the pattern file -->. Color of the boundaries remain set
  1127. by the <b>color</b> instruction.
  1128. Pattern may be scaled with the <b>scale</b> command. Several standard hatching
  1129. patterns are provided in <tt>$GISBASE/etc/paint/patterns/</tt>.
  1130. Demonstrative images can be found on the
  1131. <a href="https://grasswiki.osgeo.org/wiki/AreaFillPatterns">GRASS Wiki site</a>.
  1132. You can also create your own custom pattern files in a text editor.
  1133. Example of pattern file:
  1134. <div class="code"><pre>
  1135. %!PS-Adobe-2.0 EPSF-1.2
  1136. %%BoundingBox: 0 0 10 10
  1137. newpath
  1138. 5 0 moveto
  1139. 5 10 lineto
  1140. stroke
  1141. </pre></div>
  1142. <p><b>scale</b> - pattern scale
  1143. <p><b>pwidth</b> - pattern line width, width is used by pattern until the width is overwritten
  1144. in pattern file.
  1145. <p>
  1146. <div class="code"><pre>
  1147. EXAMPLE:
  1148. <b>vareas</b> forest
  1149. <b>color</b> blue
  1150. <b>width</b> 1
  1151. <b>masked</b> y
  1152. <b>cats</b> 2,5-7
  1153. <b>end</b>
  1154. </pre></div>
  1155. <p>
  1156. <a name="vlines"></a>
  1157. <h2>vlines</h2>
  1158. Selects a vector map layer for output and plots lines.
  1159. <div class="code"><pre>
  1160. USAGE: <b>vlines</b> vectormap
  1161. <b>type</b> line and/or boundary
  1162. <b>layer</b> # (layer number used with cats/where option)
  1163. <b>cats</b> list of categories (e.g. 1,3,5-7)
  1164. <b>where</b> SQL where statement like: vlastnik = 'Cimrman'
  1165. <b>masked</b> [y|n]
  1166. <b>color</b> color
  1167. <b>rgbcolumn</b> column
  1168. <b>width</b> #
  1169. <b>cwidth</b> #
  1170. <b>hcolor</b> color
  1171. <b>hwidth</b> #
  1172. <b>offset</b> #
  1173. <b>coffset</b> #
  1174. <b>ref</b> left|right
  1175. <b>style</b> 00001111
  1176. <b>linecap</b> style
  1177. <b>label</b> label
  1178. <b>lpos</b> #
  1179. <b>end</b>
  1180. </pre></div>
  1181. The user can specify:
  1182. <p><b>type</b> - the default is lines only;
  1183. <p><b>color</b> - color of the vector lines or area boundaries;
  1184. <p><b>rgbcolumn</b> - name of color definition column used for the vector lines
  1185. or area boundaries;
  1186. <p><b>width</b> - width of the vectors lines or area boundaries in points
  1187. (accepts decimal points [floating points] as well as integers);
  1188. <p><b>cwidth</b> - width of the vectors lines. If cwidth is used then
  1189. width of line is equal to cwidth * category value and width is
  1190. used in legend;
  1191. <p><b>hcolor</b> - the highlight color for the vector lines;
  1192. <p><b>hwidth</b> - the width of the highlight color in points;
  1193. <p><b>offset</b> (experimental) - offset for the vectors lines in points (1/72")
  1194. for plotting parallel lines in distance equal to offset (accepts positive or
  1195. negative decimal points). Useful to print streets with several parallel lanes;
  1196. <p><b>coffset</b> (experimental) - offset for the vectors lines. If coffset
  1197. is used then offset of line is equal to coffset * category value and offset
  1198. is used in legend;
  1199. <p><b>ref</b> (experimental) - line justification.
  1200. <p><b>masked</b> - whether or not the raster map layer is to be masked
  1201. by the current mask;
  1202. (see manual entry <em><a href="r.mask.html">r.mask</a></em>
  1203. for more information on the mask);
  1204. <p><b>style</b> - the line style allows the vectors to be dashed in different
  1205. patterns. This is done by either typing "solid", "dashed", "dotted", or
  1206. "dashdotted", or as a series of 0's and 1's in a desired sequence or pattern.
  1207. The first block of repeated zeros or ones represents "draw", the second
  1208. block represents "blank".
  1209. An even number of blocks will repeat the pattern, an odd number of blocks
  1210. will alternate the pattern.
  1211. The default is "solid";
  1212. <p><b>linecap</b> - the linecap specifies the look of the ends of the line,
  1213. or the end of the dashes in a dashed line. The parameters are:
  1214. 'butt' for butt caps (default), 'round' for round caps and 'extended_butt'
  1215. for extended butt caps. The shape of the round and the extended butt caps
  1216. is related to the line thickness: for round butts the radius is half the
  1217. linewidth, while for extended butt the line will extend for half the linewidth.
  1218. <p><b>cats</b> - which categories should be plotted (default is all);
  1219. <p><b>label</b> - for description in <a href="#vlegend">vlegend</a>.
  1220. Default is: map(mapset);
  1221. <p><b>lpos</b> - position vector is plotted in legend. If lpos is
  1222. 0 then this vector is omitted in legend. If more vectors used the
  1223. same lpos then their symbols in legend are merged and label for
  1224. first vector is used.
  1225. <p>
  1226. <div class="code"><pre>
  1227. EXAMPLE:
  1228. <b>vlines</b> streams
  1229. <b>color</b> blue
  1230. <b>width</b> 2
  1231. <b>hcolor</b> white
  1232. <b>hwidth</b> 1
  1233. <b>masked</b> y
  1234. <b>cats</b> 2
  1235. <b>label</b> Streams - category 2
  1236. <b>end</b>
  1237. </pre></div>
  1238. <p>
  1239. <a name="vpoints"></a>
  1240. <h2>vpoints</h2>
  1241. Selects vector point data to be placed on the output map
  1242. <div class="code"><pre>
  1243. USAGE: <b>vpoints</b> vectormap
  1244. <b>type</b> point and/or centroid
  1245. <b>layer</b> # (layer number used with cats/where/sizecol options)
  1246. <b>cats</b> list of categories (e.g. 1,3,5-7)
  1247. <b>where</b> SQL where statement like: vlastnik = 'Cimrman'
  1248. <b>masked</b> [y|n]
  1249. <b>color</b> color
  1250. <b>fcolor</b> color
  1251. <b>rgbcolumn</b> column
  1252. <b>width</b> #
  1253. <b>eps</b> epsfile
  1254. <b>symbol</b> symbol group/name
  1255. <b>size</b> #
  1256. <b>sizecolumn</b> attribute column used for symbol sizing
  1257. <b>scale</b> scaling factor for sizecolumn values
  1258. <b>rotate</b> #
  1259. <b>rotatecolumn</b> column
  1260. <b>label</b> legend label
  1261. <b>lpos</b> position in legend
  1262. <b>end</b>
  1263. </pre></div>
  1264. The user may specify the
  1265. the <b>color</b> of the sites (see section on <a href="#NAMED_COLORS">NAMED COLORS</a>);
  1266. either the GRASS <b>symbol</b> or
  1267. the <b>eps</b> Encapsulated Postscript file to be used to represent the presence of a site
  1268. (if '<b>$</b>' is used in the EPS file path it will be replaced by category number);
  1269. and <b>rotate</b> (in degrees) for counter-clockwise rotation.
  1270. <br>
  1271. The size of the icon (number of times larger than the size it is in
  1272. the icon file) is typically given by the <b>size</b> option. Alternatively
  1273. the size of the symbol or EPS graphic can be taken from an attribute column
  1274. by using the <b>sizecolumn</b> command. The value given by <b>sizecolumn</b> may be
  1275. scaled by using the <b>scale</b> factor setting (default scaling is 1.0).
  1276. In a similar manner symbol color can be read from <b>rgbcolumn</b>
  1277. and the rotation angle read from <b>rotatecolumn</b>.
  1278. <div class="code"><pre>
  1279. EXAMPLE:
  1280. <b>vpoints</b> windmills
  1281. <b>color</b> blue
  1282. <b>symbol</b> mills/windmill
  1283. <b>size</b> 10
  1284. <b>end</b>
  1285. </pre></div>
  1286. <p>
  1287. <a name="vlegend"></a>
  1288. <h2>vlegend</h2>
  1289. Prints the portion of the map legend containing the
  1290. vector information, on or below the map.
  1291. <div class="code"><pre>
  1292. USAGE: <b>vlegend</b>
  1293. <b>where</b> x y
  1294. <b>font</b> font name
  1295. <b>fontsize</b> font size
  1296. <b>width</b> width of color symbol
  1297. <b>cols</b> number of columns to print
  1298. <b>span</b> column separation
  1299. <b>border</b> color|none
  1300. <b>end</b>
  1301. </pre></div>
  1302. The default location is immediately below the legend containing the
  1303. scale, grid and region information, starting at the left edge of the map.
  1304. If the <em>where</em> instruction is present and <em>y</em> is less than or
  1305. equal to zero, the vector legend will be positioned immediately below
  1306. the map, starting <em>x</em> inches from the left edge of the page.
  1307. <p><em>width</em> is the width in inches of the color symbol (for lines)
  1308. in front of the legend text. The default is 1/24 * fontsize inches.
  1309. <p><em>cols</em> is the number of columns to split the legend into. The
  1310. default is one column. The maximum number of columns is 10, or equal
  1311. to the number of legend entries if there are less than 10 entries.
  1312. <p><em>span</em> is the column separation distance between the left edges of
  1313. two columns in a multicolumn legend. It is given in inches.
  1314. The default is automatic scaling based on the left margin and the right
  1315. hand side of the map box.
  1316. <p><em>border</em> will draw a border around the legend using the specified color.
  1317. (see <a href="#NAMED_COLORS">NAMED COLORS</a>)
  1318. <p>Alternatively, the user can create a custom legend by using the
  1319. <a href="#rectangle">rectangle</a>, <a href="#point">point</a>, and
  1320. <a href="#text">text</a> instructions.
  1321. <p>See also the <a href="#colortable">colortable</a> command for creating
  1322. raster map legends.
  1323. <p>This example prints the vector legend
  1324. immediately below the map and starting 4.5 inches from the left edge
  1325. of the page, using a 12/72 inch Helvetica font.
  1326. <div class="code"><pre>
  1327. EXAMPLE:
  1328. <b>vlegend</b>
  1329. <b>where</b> 4.5 0
  1330. <b>font</b> Courier
  1331. <b>fontsize</b> 12
  1332. <b>end</b>
  1333. </pre></div>
  1334. <p>
  1335. <a name="end"></a>
  1336. <h2>end</h2>
  1337. Terminates input and begin painting the map.
  1338. <div class="code"><pre>
  1339. USAGE: <b>end</b>
  1340. </pre></div>
  1341. <br>
  1342. <p>
  1343. <h2>EXAMPLES</h2>
  1344. The following are examples of <em>ps.map</em> script files.
  1345. <p><h3>Simple example</h3>
  1346. The file has been named <em>simple_map.txt</em>:
  1347. <div class="code"><pre>
  1348. <i># this ps.map example draws a map of Wake county, NC</i>
  1349. <b>raster</b> elevation
  1350. <b>vlines</b> roadsmajor
  1351. <b>color</b> 30:144:255
  1352. <b>width</b> 2
  1353. <b>end</b>
  1354. <b>text</b> 50% 105% Wake County Terrain and Roads
  1355. <b>size</b> 550
  1356. <b>end</b>
  1357. <b>end</b>
  1358. </pre></div>
  1359. Generate map as Postsript file:
  1360. <div class="code"><pre>
  1361. ps.map input=simple_map.txt output=simple_map.ps
  1362. </pre></div>
  1363. <center>
  1364. <img src=ps_map_basic.png>
  1365. <p><em>Figure: Result of for the a simple Wake county terrain and roads example</em></p>
  1366. </center>
  1367. <h3>More complicated example</h3>
  1368. The following is content of a file named <em>elevation_map.txt</em>:
  1369. <!--
  1370. regular expression for syntax highlight
  1371. (replace spaces around bs by gt and lt)
  1372. ^( *)([a-z]+)([ ]|$)
  1373. \1 b \2 /b \3
  1374. -->
  1375. <div class="code"><pre>
  1376. <i># this ps.map example draws a map of Wake county, NC</i>
  1377. <b>raster</b> elevation
  1378. <b>colortable</b> y
  1379. <b>where</b> 1 6.0
  1380. <b>cols</b> 4
  1381. <b>width</b> 4
  1382. <b>font</b> Helvetica
  1383. <b>end</b>
  1384. <b>setcolor</b> 6,8,9 white
  1385. <b>setcolor</b> 10 green
  1386. <b>vlines</b> streams
  1387. <b>width</b> 0.1
  1388. <b>color</b> blue
  1389. <b>masked</b> n
  1390. <b>label</b> streams
  1391. <b>end</b>
  1392. <b>vlines</b> roadsmajor
  1393. <b>width</b> 1.5
  1394. <b>style</b> 1111
  1395. <b>color</b> grey
  1396. <b>masked</b> n
  1397. <b>label</b> major roads
  1398. <b>end</b>
  1399. <b>vlegend</b>
  1400. <b>where</b> 4.5 0
  1401. <b>font</b> Courier
  1402. <b>fontsize</b> 8
  1403. <b>end</b>
  1404. <b>text</b> 30% 100% Wake County Terrain
  1405. <b>color</b> black
  1406. <b>width</b> 1
  1407. <b>background</b> white
  1408. <b>size</b> 550
  1409. <b>ref</b> lower left
  1410. <b>end</b>
  1411. <b>text</b> 92% -25% meters
  1412. <b>color</b> black
  1413. <b>width</b> 1
  1414. <b>background</b> white
  1415. <b>size</b> 550
  1416. <b>ref</b> lower left
  1417. <b>end</b>
  1418. <b>scale</b> 1:125000
  1419. <b>scalebar</b> f
  1420. <b>where</b> 1.5 5.5
  1421. <b>length</b> 5000
  1422. <b>height</b> 0.05
  1423. <b>segment</b> 5
  1424. <b>numbers</b> 5
  1425. <b>end</b>
  1426. <b>geogrid</b> 60 s
  1427. <b>color</b> gray
  1428. <b>numbers</b> 2 black
  1429. <b>end</b>
  1430. <b>paper</b> a4
  1431. <b>end</b>
  1432. <b>end</b>
  1433. </pre></div>
  1434. This script file can be entered at the command line:
  1435. <div class="code"><pre>
  1436. # First set the region
  1437. g.region raster=elevation
  1438. # Generate map as Postsript file
  1439. ps.map input=elevation_map.txt output=elevation.ps
  1440. </pre></div>
  1441. <center>
  1442. <img src=ps_map.png>
  1443. <p><em>Figure: Result of for the more complicated Wake county, NC example</em></p>
  1444. </center>
  1445. <!--
  1446. todos according to things which were in the Spearfish example
  1447. TODO: now we have no example which would contain comment:
  1448. # Generate comment file (or use text editor)
  1449. echo "Spearfish (SD) soils" &gt; soil.cmt
  1450. TODO: now we have no example with point and line
  1451. line 606969.73 3423092.91 616969.73 3423092.91
  1452. color yellow
  1453. width 2
  1454. end
  1455. point 40% 60%
  1456. color purple
  1457. symbol basic/diamond
  1458. size 25
  1459. masked n
  1460. end
  1461. TODO: example with outline
  1462. outline
  1463. color black
  1464. width 1
  1465. end
  1466. -->
  1467. <p>More examples can be found on the
  1468. <a href="https://grasswiki.osgeo.org/wiki/Ps.map_scripts">GRASS Wiki</a>
  1469. help site.
  1470. <p>
  1471. <h2>SEE ALSO</h2>
  1472. <em>
  1473. <a href="g.gui.psmap.html">g.gui.psmap</a>,
  1474. <a href="g.region.html">g.region</a>,
  1475. <a href="v.label.html">v.label</a>,
  1476. <a href="wxGUI.html">wxGUI</a>,
  1477. </em>
  1478. <h2>AUTHOR</h2>
  1479. Paul Carlson, USDA, SCS, NHQ-CGIS<br>
  1480. Modifications: Radim Blazek, Glynn Clements, Bob Covill, Hamish Bowman
  1481. <!--
  1482. <p>
  1483. <i>Last changed: $Date$</i>
  1484. -->