GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
r.out.ppm(1) GRASS GIS User's Manual r.out.ppm(1)

r.out.ppm - Converts a GRASS raster map to a PPM image file.

raster, export, output

r.out.ppm
r.out.ppm --help
r.out.ppm [-gh] input=name [output=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Output greyscale instead of color

Suppress printing of PPM header

Allow output files to overwrite existing files

Print usage summary

Verbose module output

Quiet module output

Force launching GUI dialog


Name of input raster map

Name for new PPM file (use ’-’ for stdout)
Default: <rasterfilename>.ppm

r.out.ppm converts a GRASS raster map into a PPM image at the pixel resolution of the CURRENTLY DEFINED REGION. To get the resolution and region settings of the raster map, run:

g.region -p raster=[mapname]

before running r.out.ppm.

By default the PPM file created is 24-bit color, rawbits storage. You can use the -g flag to force r.out.ppm to output an 8-bit greyscale instead. The greyscale conversion uses the NTSC conversion:

Y = .30*Red + .59*Green + .11*Blue

One pixel is written for each cell value, so if ew_res and ns_res differ, the aspect ratio of the resulting image will be off.

A few ppm file comments are written: the name of the GRASS raster map, resolution, etc. Although these are perfectly legal, I’ve found one PD image utility that chokes on them, so if you need a commentless PPM file, use ’out=- > outfile.ppm’. (When sending output to stdout, no comments are written.)

You can create a PNG image with NULL values represented by a transparent background by using the PNG driver with GRASS_RENDER_TRANSPARENT set to TRUE. Alternatively, you can use the pnmtopng program from netpbm to do this:

r.out.ppm raster
pnmtopng -transparent white raster.ppm > raster.png

d.out.file, r.out.ascii, r.out.gdal, r.out.mpeg, r.out.png, r.out.ppm3

Bill Brown, UIUC

Available at: r.out.ppm source code (history)

Latest change: Tuesday Dec 17 20:17:20 2024 in commit: d962e90c026708a4815ea2b9f46c0e84c17de22d

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

GRASS 8.4.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.