[GRASS-dev] discussion: replacing ps.map

Glynn Clements glynn at gclements.plus.com
Fri Mar 30 02:38:12 EDT 2007


Trevor Wiens wrote:

> > > 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.
> 
> I raised this point because ps.map was much slower than d.rast but the
> resolution of the output was not the same, thus the comparison wasn't
> fair.
> 
> If I wanted to test the relative performance of d.rast vs ps.map how
> would one determine the resolution of you x.mon?

The issue is whether the number of rows in the current region exceeds
the number of rows displayed in the monitor (i.e. whether d.rast is
scaling down). The monitor height is printed at startup (the default
is 480 rows).

ps.map will dump each row in the current region to the PostScript
file. OTOH, d.rast (or rather the D_* functions which it uses)
determines which rows will actually be rendered. If a row isn't
required, it will be completely skipped; i.e. no G_get_raster_row(),
no G_lookup_colors() etc.

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




More information about the grass-dev mailing list