FREC 682 Spatial Analysis

course syllabus


Hardcopy

Paper maps provide portable, static views of GIS analyses, and they can make nice wallpaper. As a GIS practitioner, you will need to generate hardcopy maps to include in (and add razzle-dazzle to) your technical reports. Frequently, the people controlling your research funding see GIS as computer-aided cartography; being ignorant of its other capabilities, they expect hardcopy maps.

UD Printers

  1. The Townsend X-terminal room laser printer is tnsps. It handles Adobe Postscript (black and white only) and various other formats, standard 8.5x11" paper only. Print files on it with the command

      	qpr -q tnsps imagefile

  2. CNS's Colorscript laser printer smicolps in the basement of Smith Hall handles Postscript only (color), standard 8.5x11 format only. Keep your graphics within its margins: in portrait orientation, 0.8" top, 1.3" bottom, 0.2" left and right; in landscape orientation, 1.3" left, 0.8" right, 0.2" top and bottom. Otherwise your image will be truncated.

    Postscript is a set of proprietary graphics formats licensed by Adobe Systems. The Colorscript printer handles Adobe 1 and most Adobe 2 formats. If necessary, you can use the psfix utility to convert later Adobe 2 formats to earlier formats. Output from the Colorscript printer costs 50 cents per page, payable when you pick it up at Smith. If you request it, CNS will print your Colorscript output as overhead transparencies for an additional charge. Print files to the Colorscript printer with the command

      	printcolor imagefile
    (the preferred way, with a burst page identifying you), or

     	qpr -q smicolps imagefile

  3. CNS also has a large-scale (letter size to E-paper) color printer smicoljet. This device handles Postscript format only, and outputs letter-size hardcopy unless you change its console settings. Its inks can fade over time. There is no charge (yet!) for hardcopy from this device. The print command for it is
    	qpr -q smicoljet imagefile  

You should be aware that Postscript is a very inefficient format for raster images: the files get very big. You can avoid cluttering up your disk space with Postscript-format image files: save your images in more compact formats such as .GIF or Sun Raster, and pipe these through a Postscript conversion filter or use XView (see bwlow) to print them on a Postscript device.

Unix Graphics Utilities

The Sun Open Windows snapshot utility lets you capture your screen, a window, or any portion of your screen outlined with the mouse, as a Sun raster file. It is easiest to learn simply by experimenting with it. The time-delay option lets you move the mouse cursor out of the snapshot area before the snapshot is taken.

xview by John Bradley (U. Pennsylvania) lets you edit files in Sun raster and most other bitmap formats. It supports file format conversions; color editing; various filters for dithering, edge-enhancement, etc; The newest version also supports rudimentary text annotations. It reads Postscript files through a ghostscript filter. It lets you print files in other formats as Postscript output, controlling page size and image placement on the page. (Note: I am told the smicoljet printer will print larger-scale output from xview without manual resetting at the console, but I haven't yet verified this myself.) Very useful package.

The portable bitmap (PBM) tools by Jef Poskanzer translate graphics files through various intermediate "portable" formats, and support various file manipulations. (Note that XView can perform many of these functions as well, and also lets you see what's happening.) The intermediate formats include portable bitmap (PBM), portable graymap (PGM), portable anymap (PNM) and portable pixmap (PPM).

A partial list of conversion tools is:

Format			   	to PBM		from PBM

ASCII graphic			--		pbmtoascii
Epson printer graphics		--		ppmtoepson
FITS				fitstopgm	pgmtofits
GEM .img 			gemtopbm	pbmtogem
Compuserve GIF			giftoppm	ppmtogif
HP Laserjet			--		pbmtolj
HP Paintjet			pjtoppm		ppmtopj
MacPaint			mactopbm	pbmtomac
Mac PICT			picttopbm	pbmtopict
PCX				pcxtoppm	ppmtopcx
Postscript "image" data		psidtopgm	--
Postscript			--		pnmtops
Sun raster			rasttopnm	pnmtorast
Targa				tgatoppm	ppmtotga
TIFF				tifftopnm	pnmtotiff
X11 bitmap			xbmtopbm	pbmtoxbm
X11 pixmap			xpmtoppm	ppmtoxpm
X11 window dump			xwdtopnm	pnmtoxwd
greymap--bitmap			--		pgmtopbm
pixmap--greymap			ppmtopgm	pgmtoppm
RGB greymap color separates	rgb3toppm	ppmtorgb3
PBM manipulation tools include:
pbmreduce	reduces the size of a portable bitmap by factor N
pbmtext		creates bitmap of text
pgmedge		edge-detection for greymap
pgmenhance	edge-enhancement of greymap
pgmhist		prints histogram of graymap values
pgmnorm		greymap constrast stretch, saturating 2% black, 1% white
pnmarith	adds, subtracts or multiplies 2 congruent anymaps
pnmcat		concatenates anymaps left-to-right or top-to-bottom
pnmcrop		crops an anymap (eliminates single-color edge)
pnmcut		cuts a rectangle out of an anymap
pnmdepth	rescales color ranges in an anymap
pnmenlarge	enlarges an anymap by factor N
pnmflip		flips, rotates or transposes an anymap
pnmgamma	does gamma correction (adjusts brightness) on an anymap
pnminvert	black-white inverts an anymap
pnmmargin	adds a single-color border to an anymap
pnmpaste	pastes one anymap into another anymap
pnmrotate	rotates an anymap to any angle (-90 to 90 degrees)
pnmscale	rescales x and y dimensions of an anymap
pnmsmooth	replaces each pixel with 9-cell neighborhood average
ppmdither	reduces pixmap RGB's to specified ranges by dithering
ppmmake		creates a pixmap of specified color and size

To convert a color map to black and white and print it on the Townsend printer, save a Sunraster-format snapshot of it as file.rs, then:

 	rasttopnm file.rs | ppmtopgm | pnmtops | qpr -q tnsps

This sequence converts the Sunraster color file to a portable pixmap, converts that to a portable graymap, converts that to Postscript (resizing to fit a standard page if necessary), and pipes that format to the Townsend printer. (Note that PNM, PPM and PGM formats are treated as equivalents.)

To print a color map to the Colorscript printer:

 	rasttopnm file.rs | pnmtops | printcolor

(Make sure your image is small enough to fit inside smicolps's margins.)

GRASS on a Microcomputer under Exceed

Some of the microcomputers in the Townsend microcomputer lab annex (behind the X-terminal room) are networked and equipped with Hummingbird's Exceed network X-emulation software, which runs under Microsoft Windows. You can run GRASS through an Exceed session, and Exceed lets you save any GRASS monitor display to the Windows Clipboard (so you can bring it directly into a WordPerfect document, for example), to a local file, or directly to a printer. Be aware that Exceed may lose parts of an image in your GRASS monitor if you drop other windows over it; simply redisplay them as necessary.

The microcomputers in the annex are networked to the HP4M laser printer in that room. You can print to that printer, or you can ftp saved color images to Strauss, and print them on the Colorscript printer.



course syllabus