[GRASS5] Higher Resolution Output from NVIZ

Bob Covill bcovill at tekmap.ns.ca
Thu Feb 8 17:33:47 EST 2001


Hello,

I have added some new modules (CVS) to the ogsf library and nviz that
allow higher resolution (larger) images to be saved from the viewer. I
apologize for the lengthy description, but I want to ensure that it is
clear what I have done.

With the new modules added select "Save Max Resolution PPM(s) from the
File -> Image Dump menu. This will bring up the usual File Select Box
where you will set the "prefix" for the files to be saved.

The program then determines the maximum posible resoltion that can be
output from your current opengl setup. This dimension is printed to
stderr if you want to check it. For example my Linux box outputs to a
maximum 2048x1200. Higher end systems with high end graphics should
output much larger.

>From the maximum resolution the program calculates the maximum
magnification from the present viewport aspect ratio. It then draws a
series of tiles in the current window at this this magnification and
saves the enlarged tiles to a ppm with the above set prefix. The program
starts in the lower left corner. The output files (tiles) are named
accrording to the above prefix and are appended by the row number and
the column number (e.g. FILE_1_2.ppm is the second tile on the first
row). After all the tiles have been rendered and saved the original view
is restored. The program uses the Ndraw_all function, so all selected
rasters, vectors, etc are drawn.

After the files are saved they can be assembled into the final large
image with the pnmcat program or other graphical package. With pnmcat,
first assemble the rows with "pnmcat -leftright FILE_1_1.ppm
FILE_1_2.ppm ... > row1.ppm". With all the rows assembled create the
final image with "pnmscat -topbottom row3.ppm row2.ppm ... > FINAL.ppm".

You can maximize the magnification by changing the aspect ratiom (i.e.
dragging a corner) of the nviz display window to best match your maximum
opengl dimension.

I hope this has been reasonably clear. Any questions / comments /
problems are welcome.

This is mean't to be a first step in high(er) resolution output from
nviz and it will hopefully get a little simpler down the road.

--
Bob Covill

Tekmap Consulting
P.O. Box 2016
Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill at tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcovill.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: Card for Bob Covill
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20010208/3391efe1/bcovill.vcf


More information about the grass-dev mailing list