Tip on P.map with ppm printers

kcurrans at ava.bcc.orst.edu kcurrans at ava.bcc.orst.edu
Tue Nov 17 10:21:19 EST 1992


I recently saw folks were using P.map with the painter of ppm selected
were having problems with scaling up size of area. I have recently modified
p.map's behavior to give larger output on our HP paintjet XL.

Tip 1:  I have found the scale (which p.map prompts you for) to mean
	how many panels do you want your output to consist of.

	Inches is meaningless when you print to a ppm file, because
	target print pixel size is unknown. Scaling can be done in
	pnmscale.

	A panel is the maximum size of the image that p.map can produce.

	(if you ask for your output map to be scale to say, 6 panels
	you should have 6 printouts to cut up and paste together to
	make one big map.  But they all get jamed into the paint.ppm
	file, of which I have not found a way to pull more then just
	the first out.  There should be 6 paint.ppm files, or something.)


Tip 2:  I use ppmtopj, since it can handle a ppm file directly rather
	than converting it to an xwd file.  This is in the
	pbmplus10dec91 distribution.   Which can be found on
	wuarchive.wustl.edu in /graphics/graphics/packages/pbmplus


Tip 3:  (the best)  P.select sets your printer up for you. Besides
	just setting your PAINTER envariable this program runs a 
	shell script in ~grass/etc/paint/driver.sh/xxx where xxx is the
	type of printer you selected.  In the ppm shell script
	there are important envariables, two can help you print
	larger images then the p.map default. WIDTH and HEIGHT.

	HEIGHT and WIDTH were set at 800 and 600 (I forgot the original
	setting).  On the HPPaintjet XL with 11x17 inch paper we can
	print at 180 dpi.  So to print large 11x11 inch square images
	I set these to 2340 and 2340.  So I will get a large HI resolution
	print of a soils map.  I then choose a scale of one panel on
	the p.map prompt, and get a 11x11 inch print.  I print a square
	map so I can rotate the final image without worrying about clipping
	off parts of the map.  The state of Oregon on our maps comes out
	on an angle of the declination, so I rotate it -79 degress to
	get it in landsape mode.
	The following script is a simple one containing the steps I go through:
		p.map
		xv paint.ppm
		ppmcrop paint.ppm | pnmrotate -79 > p.p
		xv p.p
		ppmtopj p.p | lpr -s -Ppablo

Tip 4:  The above change will produce large output paint.ppm files.
	(my soil map was 24 megs)  We have added to the /etc/printcap entry
	for our color printer a mx#0 setting that allows for unlimited large
	prints, but the /etc/spool space is limited. With multiple users
	printing this will get filled up, so I suggest you do not pipe
	to lpr, but rather convert you ppm to a pj file then link
	the file to the spooler (lpr -s).

	
FYI.
Kevin Currans				Dept of Entomology, 
					Oregon State University
Internet: kcurrans at bcc.orst.edu		Corvallis, Oregon U.S.A. (503)737-5515



More information about the grass-user mailing list