[GRASS-dev] discussion: replacing ps.map

Glynn Clements glynn at gclements.plus.com
Thu Mar 29 19:03:26 EDT 2007


Trevor Wiens wrote:

> > -- snip -- 
> > To conduct such a test, generate a PostScript representation of a
> > vector map using ps.map, then compare the time taken to render it to
> > an image with "gs" against using d.vect with direct rendering.
> > 
> 
> Method:
> 1. d.vect - create and render
> 
> Create shell script of d.mon start, d.vect, & d.mon stop commands

Use direct rendering (GRASS_RENDER_IMMEDIATE=TRUE) and scrap the
d.mon/d.stop phase. I'm currently more interested in rendering to
image files than rendering directly onto the screen.

> time ./displayscript.sh
> 
> 2. ps.map - create psfile and display
> 
> a. Create ps.map file
> 
> time ps.map input=psmap.script output=testmap
> 
> b. display ps file
> 
> time gs -sDEVICE=x11 -dNOPAUSE testmap.ps -c quit

I'd suggest using -sDEVICE=ppmraw.

> c. combined 
> 
> time ./comboshell.sh

[snip]

> For vector only data, ps rendering would be a viable alternative to the
> current display architecture. However for raster imagery the creation
> of postscript files is painfully slow.

How fast was d.rast? I only see d.vect in your timings.

> I don't know if there is a way
> to improve on this, but perhaps it is possible to adjust the resolution
> of the raster image within the postscript file such as the -D
> parameter used in dvips.

The raster image will be written to the PostScript file at the current
region's resolution. If you want a lower resolution image, reduce the
region resolution.

If the region has a higher resolution than the display window, d.rast
will completely skip any lines which won't be displayed. But ps.map
can't do this, as it has no idea whether you are going to display the
PostScript data on a 75dpi monitor or a 1200dpi laser printer.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list