scale problem using ppm-files
Sven Fuhrmann
sven at linus.uni-muenster.de
Mon Nov 15 09:43:05 EST 1993
Dear GRASS-users,
I have a little scale problem in GRASS4.1 and I hope you will be
able to help me.
I have access to a Canon CLC 10 Color Laser Printer (Canon IPU)
which has a dpi of 400x400. Unfortunately I do not have a Canon CLC 10
driver. In order to solve this problem I do create a ppm-file in GRASS
using p.map. In a second step the ppm-file will be transformed to a
postscript-file using the ppmtops command under pbmplus (written by
Joe Postkanzer).
As you know, there is a driver.sh for the ppm-command and i set it up as
following :
:
HRES=400.0
VRES=400.0
NCHARS=1
TEXTSCALE=1
TEXTFUDGE=0
TEXTSPACE=1
BLOCKSIZE=1
BLOCKSPACE=1
NBLOCKS=1
MAPLP=${MAPLP-$HOME/paint.ppm}
WIDTH=2000
HEIGHT=2000
cp /dev/null $MAPLP
export HRES VRES NCHARS MAPLP WIDTH HEIGHT
export TEXTSCALE TEXTSPACE TEXTFUDGE BLOCKSIZE BLOCKSPACE NBLOCKS
exec ${PAINT_DRIVER?}
In a next step I ran p.map in GRASS, using a 10x10 pixelmap, res:30m
and a 1:25000 scale):
REGION FACILITY
LOCATION: spearfish MAPSET: sven
CURRENT REGION: N=4921000 S=4920700 RES=30 ROWS=10
E= 591300 W= 591000 RES=30 COLS=10
PROJECTION: 1 (UTM)
ZONE: 13
-------------------------
PAINTER: ppm
LOCATION: spearfish
MAPSET: sven
MASK: none
RASTER: elevation in PERMANENT
COLORMODE: best
VECTORS: (none)
SITES: (none)
LABELS: (none)
SCALE: 1:25000
GRID: 100 meter, numbered
As a result I got a 12MB paint.ppm file with a pixelcount of 2000x2000 cells.
I did change the maximum width and height in the driver.sh and still: the
pixelcount in the ppm file always changed to the maximum number of cells.
In fact, the scale I wrote down in p.map was not achieved.
The read.me file in GRASS does not give me a hint where to look for in order
to solve this probem.
READ.me file in GRASS:
>The maximum width and height of the output is set in Driver.sh as the
>variables HEIGHT and WIDTH. You can change these if you wish. I have
>not figured out what combinations are good. No matter what values you
>pick some window sizes will fit better than others.
I did transform those ppm-files into postscript format and I could see that
the size of the printout had something to do with the width and height
changed in the driver.sh. but still: I do not get the right scale.
I would appreciate any help in order to solve this problem
Thank you,
Sven Fuhrmann
More information about the grass-user
mailing list