[GRASSLIST:4400] Re: Problems with ps.map
Hamish
hamish_nospam at yahoo.com
Wed Sep 22 21:34:11 EDT 2004
> Problem 1:
> When I plot a raster map (494 rows, 592 columns, 30 m resolution) with
> d.rast, it looks as I expect it. However, when I save it with ps.map
> as postscript file, the raster map looks relatively coarse. I.e.,
> pixels are removed or added, and patches show stairs-like boundaries.
> Changing the scale does not change anything.
ps.map follows the region's resolution:
g.region -p
g.region res=30
?
> With GRASS 5.3 (installed from binaries) and after changing the
> mapping instructions, the result with ps.map looks fine, but the file
> is about double the size as under GRASS 5.7.
The file size should be proportional to number of raster cells + C.
So again, is the 5.7 version using the correct region settings?
> Problem 2:
> When I include a color table in the mapping instructions, a gradient
> of many different colors is shown in the color table (GRASS 5.3).
> Actually, I would like to show only 5 colors that are used in the
> raster map.
Yeah.. that's a limitation. In the display monitor you can do:
d.legend use=
Best ps.map work around I've found is to make a second vector/raster map
with values all outside of the current region (blank), only containing
the integer values you want (d.rast.edit), copy the color table with
'r.colors rast=', and display the legend for that map with the data from
the first map.....
> Changing the values to integer results in the "no data" box being
> drawn.
Other *LABELED* categories should be drawn too. r.support or edit
$MAPSET/cats/$MAPNAME
You can turn that 'nodata' off with the "nodata n" switch by the way.
> Problem 3:
> Neither under GRASS 5.7 or GRASS 5.3 I'm able to add a vector to the
> raster map (however, this works with a monitor using d.rast and
> d.vect). Under GRASS 5.7, I get no error:
works for me
> > GRASS 5.7.-cvs > ps.map -e in=model4.ssq.pred2.psmap
> > out=model4.ssq.pred.eps
> > PS-PAINT: scale set to 1 : 107571.
> > PS-PAINT: reading raster file <model4.ssq.pred2.r in data1> ...
> > PS-PAINT: reading vector file <perimeter2v in data1> ...
> > PS-PAINT: creating color table for <model4.ssq.pred2.r in data1> ...
> > PS-PAINT: PostScript file "model4.ssq.pred.eps" successfully
> > written.
> But the vector "perimeter2v" is not drawn in the output.
>
> Under GRASS 5.3, I get the following error:
> > GRASS 5.3-cvs > ps.map in=model4.ssq.pred3.psmap
> > out=model4.ssq.pred2.ps
> > PS-PAINT: PostScript painter "us-letter" selected.
> > pwidth = 8.500000 pheight = 11.000000
> > PS-PAINT: scale set to 1 : 107571.
> > PS-PAINT: reading raster file <model4.ssq.pred2.r in data1> ...
> > PS-PAINT: reading vector file <perimeter.v in data1> ...ERROR:
> > vector file perimeter.v in data1 : can't open
make sure the vector name is correct? not missing any "end" statements?
Hamish
More information about the grass-user
mailing list