[GRASSLIST:4406] Re: Problems with ps.map

Christof Bigler christof.bigler at colorado.edu
Thu Sep 23 15:39:31 EDT 2004

Thanks for the reply! I came up with the following workarounds:

Problem 1 (resolution):
g.region res=30 is my default resolution and it produces under GRASS 
5.7 the coarse raster map. When I use res=15, the postscript map looks 
like the map produced under GRASS 5.3 with res=30. Both maps are almost 
the same size.

Problem 2 (color table):
I think, I will create the color table with Illustrator, which seems to 
be faster.

Problem 3 (vector):
Under GRASS 5.0.2 and 5.3, I was finally able to create a postscript 
map that shows also the vector map. However, under GRASS 5.7, I 
couldn't add any vector to the raster map, although there were no error 
messages (see below). The vector map has been created under GRASS 
5.0.2, converted with v.convert to GRASS 5.7, and the topology has been 
built with v.build. I can display the vector map on a monitor with 


On 22.09.2004, at 19:34, Hamish wrote:

>> 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
> 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