GRASS

GRASS GIS 6.2.3 Reference Manual

Geographic Resources Analysis Support System, commonly referred to as GRASS, is a Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization. GRASS is currently used in academic and commercial settings around the world, as well as by many governmental agencies and environmental consulting companies.

This reference manual details the use of modules distributed with Geographic Resources Analysis Support System (GRASS), an open source (GNU GPL'ed), image processing and geographic information system (GIS).

Quick Introduction

Full command index:

  d.* display commands
  db.* database commands
  g.* general commands
  i.* imagery commands
  m.* miscellaneous commands
  ps.* postscript commands
  r.* raster commands
  r3.* raster3D commands
  v.* vector commands
  gis.m GUI frontend to GIS menus and display
  nviz visualization suite
  xganim raster map slideshow

[ d.* | db.* | g.* | i.* | m.* | photo.* | ps.* | r.* | r3.* | v.* ]

d.* commands:
d.ask Prompts the user to select a GRASS data base file from among files displayed in a menu on the graphics monitor.
d.barscale Displays a barscale on GRASS monitor.
d.colorlist Output a list of all available display colors with a configurable separator (default is comma).
d.colors Allows the user to interactively change the color table
d.colortable To display the color table associated with a raster map layer.
d.correlate prints a graph of the correlation between data layers (in pairs)
d.erase Erase the contents of the active display frame with user defined color
d.extend d.extend
d.extract d.extract
d.font.freetype Selects the font in which text will be displayed on the user's graphics monitor.
d.font Selects the font in which text will be displayed on the user's graphics monitor.
d.frame Manages display frames on the user's graphics monitor.
d.geodesic Displays a geodesic line, tracing the shortest distance between two geographic points along a great circle, in a longitude/latitude data set.
d.graph Program for generating and displaying simple graphics on the display monitor.
d.grid d.grid
d.his Displays the result obtained by combining hue, intensity, and saturation (his) values from user-specified input raster map layers.
d.histogram Displays a histogram in the form of a pie or bar chart for a user-specified raster file.
d.info Display information about the active display monitor
d.labels Displays text labels (created with v.label) to the active frame on the graphics monitor.
d.legend Displays a legend for a raster map in the active frame of the graphics monitor.
d.linegraph Generates and displays simple line graphs in the active graphics monitor display frame.
d.m Display manager for GRASS
d.mapgraph Generates and displays simple graphics on map layers drawn in the active graphics monitor display frame.
d.measure Measures the lengths and areas of features drawn by the user in the active display frame on the graphics monitor.
d.menu Creates and displays a menu within the active frame on the graphics monitor.
d.mon To establish and control use of a graphics display monitor.
d.monsize Selects/starts specified monitor at specified size
d.mvmon Moves displayed maps to another monitor
d.nviz Create fly-through script to run in NVIZ
d.out.file Saves active display monitor to graphics file in home directory
d.out.gpsdrive Export display monitor to a GpsDrive compatible backdrop image
d.out.png Saves active display monitor to PNG file in home directory
d.path d.path
d.polar Draws polar diagram of angle map such as aspect or flow directions
d.profile Interactive profile plotting utility with optional output.
d.rast.arrow Draws arrows representing cell aspect direction for a raster map containing aspect data.
d.rast.edit d.rast.edit
d.rast Displays and overlays raster map layers in the active display frame on the graphics monitor
d.rast.leg Displays a raster map and its legend on a graphics window
d.rast.num Overlays cell category values on a raster map layer displayed to the graphics monitor.
d.redraw Redraws the current display frame in the GRASS monitor
d.resize Resizes active display monitor
d.rgb Displays three user-specified raster map layers as red, green, and blue overlays in the active graphics frame.
d.rhumbline Displays the rhumbline joining two user-specified points, in the active frame on the user's graphics monitor.
d.save Create a list of commands for recreating screen graphics.
d.slide.show Slide show of GRASS raster/vector maps
d.split Divides active display into two frames & displays maps/executes commands in each frame.
d.text.freetype Draws text in the graphics monitor's active display frame using TrueType fonts.
d.text Draws text in the active display frame on the graphics monitor using the current font.
d.title Outputs a TITLE for a raster map layer in a form suitable for display by d.text.
d.vect.chart d.vect.chart
d.vect d.vect
d.vect.thematic Displays thematic vectormap
d.what.rast Allows the user to interactively query the category contents of multiple raster map layers at user specified locations within the current geographic region.
d.what.vect d.what.vect
d.where d.where
d.zoom d.zoom

db.* commands:
db.columns list all columns for a given table.
db.connect Prints/sets general DB connection for current mapset and exits.
db.copy Copy a table. Either 'from_table' (optionaly with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time.
db.describe Describe a table (in detail).
db.drivers List all database drivers.
db.droptable db.droptable
db.execute Execute any SQL statement.
db.login Set user/password for driver/database.
db.select Select data from database.
db.tables List all tables for a given database.
db.test Test database driver, database must exist and set by db.connect.

g.* commands:
g.access g.access
g.ask Prompts the user for the names of GRASS data base files.
g.copy g.copy
g.filename Prints GRASS data base file names.
g.findfile Searches for GRASS data base files and sets variables for the shell.
g.gisenv Outputs and modifies the user's current GRASS variable settings.
g.list g.list
g.manual Display the HTML man pages of GRASS
g.mapset Change current mapset
g.mapsets Modifies the user's current mapset search path, affecting the user's access to data existing under the other GRASS mapsets in the current location.
g.mlist Apply regular expressions and wildcards to g.list
g.mremove Apply regular expressions and wildcards to g.remove
g.parser g.parser
g.pnmcomp Overlays multiple PPM image files.
g.proj g.proj
g.region g.region
g.remove g.remove
g.rename g.rename
g.setproj
g.tempfile Creates a temporary file and prints the file name.
g.transform Computes a coordinate transformation based on the control points
g.version Displays version and copyright information

i.* commands:
i.cca Canonical components analysis (cca) program for image processing.
i.class i.class
i.cluster An imagery function that generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.
i.fft Fast Fourier Transform (FFT) for image processing.
i.fusion.brovey Brovey transform to merge multispectral and high-res panchromatic channels
i.gensig Generates statistics for i.maxlik from raster map layer.
i.gensigset Generate statistics for i.smap from raster map layer.
i.group Creates and edits groups and subgroups of imagery files.
i.his.rgb Hue-intensity-saturation (his) to red-green-blue (rgb) raster map color transformation function.
i.ifft Inverse Fast Fourier Transform (ifft) for image processing.
i.image.mosaic Mosaics up to 4 images and extends colormap; creates map *.mosaic
i.in.spotvgt Import of SPOT VGT NDVI file into a raster map
i.landsat.rgb Auto-balancing of colors for LANDSAT images
i.maxlik An imagery function that classifies the cell spectral reflectances in imagery data based on the spectral signature information generated by either i.cluster, i.class, or i.gensig.
i.oif Calculates Optimum-Index-Factor table for LANDSAT TM bands 1-5, & 7
i.ortho.photo i.ortho.photo
i.pca Principal components analysis (pca) program for image processing.
i.points Mark ground control points on image to be rectified.
i.rectify Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points
i.rgb.his Red-green-blue (rgb) to hue-intensity-saturation (his) raster map color transformation function.
i.smap Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.
i.spectral displays spectral response at user specified locations in group or images
i.target Targets an imagery group to a GRASS location and mapset.
i.tasscap Tasseled Cap (Kauth Thomas) transformation for LANDSAT-TM data
i.vpoints i.vpoints
i.zc Zero-crossing "edge detection" raster function for image processing.

m.* commands:
m.cogo A simple utility for converting bearing and distance measurements to coordinates
m.proj Convert coordinates from one projection to another (cs2cs frontend).

photo.* commands:
photo.2image photo.2image
photo.2target Create control points on an image to be ortho-rectified.
photo.camera
photo.init photo.init
photo.rectify photo.rectify

ps.* commands:
ps.map ps.map

r.* commands:
r.average Finds the average of values in a cover map within areas assigned the same category value in a user-specified base map.
r.basins.fill Generates a raster map layer showing watershed subbasins.
r.bilinear Bilinear interpolation utility for raster map layers.
r.bitpattern Compares bit patterns with a raster map
r.blend Blends color components of two raster maps by a given ratio
r.buffer Creates a raster map layer showing buffer zones surrounding cells that contain non-NULL category values.
r.carve r.carve
r.cats Prints category values and labels associated with user-specified raster map layers.
r.circle Creates a raster map containing concentric rings around a given point
r.clump Recategorizes data in a raster map layer by grouping cells that form physically discrete areas into unique categories.
r.coin Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.
r.colors Creates/Modifies the color table associated with a raster map layer.
r.composite Combines red, green and blue map layers into a single composite map layer.
r.compress Compresses and decompresses raster files.
r.contour r.contour
r.cost r.cost
r.covar Outputs a covariance/correlation matrix for user-specified raster map layer(s).
r.cross Creates a cross product of the category values from multiple raster map layers.
r.describe Prints terse list of category values found in a raster map layer.
r.digit Interactive tool used to draw and save vector features on a graphics monitor using a pointing device (mouse) and save to a raster map.
r.distance Locates the closest points between objects in two raster maps.
r.drain r.drain
r.fill.dir Filters and generates a depressionless elevation map and a flow direction map from a given elevation layer
r.fillnulls Fills no-data areas in raster maps using v.surf.rst splines interpolation
r.flow r.flow
r.grow Generates a raster map layer with contiguous areas grown by one cell.
r.his Generates red, green and blue raster map layers combining hue, intensity, and saturation (his) values from user-specified input raster map layers.
r.in.arc Convert an ESRI ARC/INFO ascii raster file (GRID) into a (binary) raster map layer.
r.in.ascii Convert an ASCII raster text file into a (binary) raster map layer.
r.in.aster r.in.aster - georeferencing, rectification, and import of Terra-ASTER imagery and relative DEM's using gdalwarp
r.in.bin Import a binary raster file into a GRASS raster map layer.
r.in.gdal r.in.gdal
r.in.gridatb Imports GRIDATB.FOR map file (TOPMODEL) into GRASS raster map
r.in.mat Import a binary MAT-File(v4) to a GRASS raster.
r.in.poly Create raster maps from ascii polygon/line data files in the current directory.
r.in.srtm Import SRTM HGT files into GRASS
r.in.wms Downloads and imports data from WMS servers
r.in.xyz Create a raster map from an assemblage of many coordinates using univariate statistics.
r.info Outputs basic information about a user-specified raster map layer.
r.kappa Calculate error matrix and kappa parameter for accuracy assessment of classification result.
r.lake Fills lake from seed at given level
r.le.patch Calculates attribute, patch size, core (interior) size, shape, fractal dimension, and perimeter measures for sets of patches in a landscape.
r.le.pixel Contains a set of measures for attributes, diversity, texture, juxtaposition, and edge.
r.le.setup r.le.setup
r.le.trace Display the boundary of each r.le patch and show how the boundary is traced, display the attribute, size, perimeter, and shape indices for each patch, and save the data in an output file.
r.los Line-of-sight raster analysis program.
r.mapcalc
r.mapcalculator r.mapcalculator - Calculates new raster map from r.mapcalc expression
r.mask Create a MASK for limiting raster operation
r.median Finds the median of values in a cover map within areas assigned the same category value in a user-specified base map.
r.mfilter Raster file matrix filter.
r.mode Finds the mode of values in a cover map within areas assigned the same category value in a user-specified base map.
r.neighbors Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.
r.null Creates explicitly the NULL-value bitmap file.
r.out.arc Converts a raster map layer into an ESRI ARCGRID file.
r.out.ascii Converts a raster map layer into an ASCII text file.
r.out.bin Exports a GRASS raster to a binary array.
r.out.gdal Exports GRASS raster data into various formats (requires GDAL)
r.out.gridatb Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL)
r.out.mat Exports a GRASS raster to a binary MAT-File.
r.out.mpeg Raster File Series to MPEG Conversion Program.
r.out.png Export GRASS raster as non-georeferenced PNG image format.
r.out.pov Converts a raster map layer into a height-field file for POVRAY.
r.out.ppm Converts a GRASS raster file to a PPM image file at the pixel resolution of the CURRENTLY DEFINED REGION.
r.out.ppm3 Converts 3 GRASS raster layers (R,G,B) to a PPM image file at the pixel resolution of the CURRENTLY DEFINED REGION.
r.out.tiff Exports a GRASS raster file to a 8/24bit TIFF image file at the pixel resolution of the currently defined region.
r.out.vrml Export a raster map to the Virtual Reality Modeling Language (VRML)
r.out.vtk Converts raster maps into the VTK-Ascii format
r.param.scale Extracts terrain parameters from a DEM. Uses a multi-scalar approach by taking fitting quadratic parameters to any size window (via least squares)
r.patch Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.
r.plane Creates raster plane map given dip (inclination), aspect (azimuth), and one point
r.profile Outputs the raster map layer values lying on user-defined line(s).
r.proj r.proj
r.quant This routine produces the quantization file for a floating-point map.
r.random.cells Generates random cell values with spatial dependence.
r.random r.random
r.random.surface Generates random surface(s) with spatial dependence.
r.reclass.area Reclasses a raster map greater or less than user specified area size (in hectares)
r.reclass Creates a new map layer whose category values are based upon the user's reclassification of categories in an existing raster map layer.
r.recode Recode raster maps.
r.region r.region
r.regression.line Calculates linear regression from two raster maps: y = a + b*x
r.report Reports statistics for raster map layers.
r.resamp.rst r.resamp.rst
r.resample GRASS raster map layer data resampling capability.
r.rescale.eq Rescales histogram equalized the range of category values in a raster map layer.
r.rescale Rescales the range of category values in a raster map layer.
r.ros Generates three, or four raster map layers showing 1) the base (perpendicular) rate of spread (ROS), 2) the maximum (forward) ROS, 3) the direction of the maximum ROS, and optionally 4) the maximum potential spotting distance.
r.series Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.
r.shaded.relief Creates shaded relief map from an elevation map (DEM).
r.sim.sediment r.sim.sediment
r.sim.water r.sim.water
r.slope.aspect Generates raster map layers of slope, aspect, curvatures and partial derivatives from a raster map layer of true elevation values. Aspect is calculated counterclockwise from east.
r.spread Simulates elliptically anisotropic spread on a graphics window and generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths.
r.spreadpath Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.
r.statistics Category or object oriented statistics.
r.stats Generates area statistics for raster map layers.
r.sum Sums up the raster cell values.
r.sun r.sun
r.sunmask r.sunmask
r.support Allows creation and/or modification of raster map layer support files.
r.surf.area Surface area estimation for rasters.
r.surf.contour Surface generation program from rasterized contours.
r.surf.fractal Creates a fractal surface of a given fractal dimension.
r.surf.gauss GRASS module to produce a raster map layer of gaussian deviates whose mean and standard deviation can be expressed by the user. It uses a gaussian random number generator.
r.surf.idw Surface interpolation utility for raster map layers.
r.surf.idw2 Surface generation program.
r.surf.random Produces a raster map layer of uniform random deviates whose range can be expressed by the user.
r.texture Generate images with textural features from a raster map
r.thin Thins non-zero cells that denote linear features in a raster map layer.
r.tileset Produces tilings of the source projection for use in the destination region and projection.
r.timestamp Print/add/remove a timestamp for a raster map.
r.to.rast3 Converts 2D raster map slices to one 3D raster volume map
r.to.rast3elev Creates a 3D volume map based on 2D elevation and value raster maps
r.to.vect r.to.vect
r.topidx Creates topographic index, ln(a/tan(beta)), map from elevation map.
r.topmodel Simulates TOPMODEL which is a physically based hydrologic model.
r.transect Outputs raster map layer values lying along user defined transect line(s).
r.univar Calculates univariate statistics from the non-null cells of a raster map.
r.univar.sh calculates univariate statistics from a GRASS raster map
r.volume r.volume
r.walk r.walk
r.water.outlet Watershed basin creation program.
r.watershed Watershed basin analysis program.
r.what Queries raster map layers on their category values and category labels.

r3.* commands:
r3.cross.rast Creates cross section 2D raster map from g3d raster volume map based on 2D elevation map
r3.in.ascii Convert a 3D ASCII raster text file into a (binary) 3D raster map layer
r3.in.v5d import of 3-dimensional Vis5D files (i.e. the v5d file with 1 variable and 1 time step)
r3.info Outputs basic information about a user-specified 3D raster map layer.
r3.mapcalc
r3.mapcalculator r3.mapcalculator - Calculates new grid3D volume from r3.mapcalc expression
r3.mask Establishes the current working 3D raster mask.
r3.mkdspf Creates a display file from an existing grid3 file according to specified threshold levels.
r3.null Explicitly create the 3D NULL-value bitmap file.
r3.out.ascii Converts a 3D raster map layer into an ASCII text file
r3.out.v5d Export of GRASS 3D raster file to 3-dimensional Vis5D file.
r3.out.vtk Converts 3D raster maps (G3D) into the VTK-Ascii format
r3.timestamp print/add/remove a timestamp for a 3D raster map
r3.to.rast Converts 3D raster maps to 2D raster maps

v.* commands:
v.buffer v.buffer
v.build.all v.build.all
v.build v.build
v.build.polylines v.build.polylines
v.category v.category
v.centroids Adds missing centroids to closed boundaries
v.clean v.clean
v.convert.all v.convert.all
v.convert v.convert
v.db.addcol Adds one or more columns to the attribute table connected to a given vector map
v.db.addtable Creates and adds a new attribute table to a given layer of an existing vector map.
v.db.connect v.db.connect
v.db.droptable removes existing attribute table of a vector map
v.db.reconnect.all Reconnect vectors to a new database
v.db.select v.db.select
v.db.update Allows to assign a new value to a column in the attribute table connected to a given map
v.delaunay v.delaunay
v.digit v.digit
v.dissolve Dissolve boundaries between adjacent areas sharing a common category number or attribute
v.distance v.distance
v.drape v.drape
v.external v.external
v.extract v.extract
v.extrude v.extrude
v.hull v.hull
v.in.ascii v.in.ascii
v.in.db v.in.db
v.in.dxf v.in.dxf
v.in.e00 Import of E00 file into a vector map.
v.in.garmin Upload Waypoints, Routes, and Tracks from a Garmin GPS receiver into a vector map.
v.in.gns Imports US-NGA GEOnet Names Server (GNS) country files into a GRASS vector points map
v.in.gpsbabel Import waypoints, routes, and tracks from a GPS receiver or GPS download file into a vector map.
v.in.mapgen Import Mapgen or Matlab vector maps into GRASS.
v.in.ogr v.in.ogr
v.in.region v.in.region
v.in.sites.all v.in.sites.all
v.in.sites v.in.sites
v.info v.info
v.kcv v.kcv
v.kernel v.kernel
v.label v.label
v.lidar.correction v.lidar.correction
v.lidar.edgedetection v.lidar.edgedetection
v.lidar.growing v.lidar.growing
v.lrs.create v.lrs.create
v.lrs.label v.lrs.label
v.lrs.segment v.lrs.segment
v.lrs.where v.lrs.where
v.mkgrid v.mkgrid
v.neighbors v.neighbors
v.net.alloc v.net.alloc
v.net v.net
v.net.iso v.net.iso
v.net.path v.net.path
v.net.salesman v.net.salesman
v.net.steiner v.net.steiner
v.normal v.normal
v.out.ascii v.out.ascii
v.out.dxf v.out.dxf
v.out.ogr v.out.ogr
v.out.pov v.out.pov
v.out.vtk v.out.vtk
v.outlier v.outlier
v.overlay v.overlay
v.parallel v.parallel
v.patch v.patch
v.perturb v.perturb
v.proj v.proj
v.qcount v.qcount
v.random v.random
v.rast.stats Calculates univariate statistics from a GRASS raster map based on vector polygons and uploads statistics to new attribute columns
v.reclass v.reclass
v.report Reports geometry statistics for vectors.
v.sample v.sample
v.segment v.segment
v.select v.select
v.split v.split
v.surf.bspline v.surf.bspline
v.surf.idw v.surf.idw
v.surf.rst v.surf.rst
v.to.db v.to.db
v.to.points v.to.points
v.to.rast v.to.rast
v.to.rast3 v.to.rast3
v.transform v.transform
v.type v.type
v.univar v.univar
v.univar.sh Calculates univariate statistics on selected table column for a GRASS vector map
v.vol.rst v.vol.rst
v.voronoi v.voronoi
v.what v.what
v.what.rast v.what.rast
v.what.vect Uploads vector values at positions of vector points to the table


Help Index | Full Index
© 2003-2007 GRASS Development Team