GRASS Toolbox modules
The GRASS Shell inside the GRASS Toolbox provides access to almost all (more
than 300) GRASS modules in command line modus. To offer a more user
friendly working environment, about 200 of the available GRASS modules and
functionalities are also provided by graphical dialogs.
GRASS Toolbox data import and export modules
This Section lists all graphical dialogs in the GRASS Toolbox to import and
export data into a currently selected GRASS location and mapset.
表 13: GRASS Toolbox: Raster and Image data import modules
Raster and Image data import modules in the GRASS
Toolbox |
Module name | Purpose |
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 | Georeferencing, rectification, and import of
Terra-ASTER imagery and relative DEM's using gdalwarp |
r.in.gdal | Import GDAL supported raster file into a GRASS binary
raster map layer |
r.in.gdal.loc | Import GDAL supported raster file into a GRASS
binary raster map layer and create a fitted location |
r.in.gdal.qgis | Import loaded raster into a GRASS binary raster map
layer |
r.in.gdal.qgis.loc | Import loaded raster file into a GRASS binary
raster map layer and create a fitted location |
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 |
i.in.spotvgt | Import of SPOT VGT NDVI file into a raster map |
表 14: GRASS Toolbox: Raster and Image data export modules
Raster and Image data export modules in
the GRASS
Toolbox |
Module name | Purpose |
r.out.gdal.gtiff | Export raster layer to Geo TIFF |
r.out.arc | Converts a raster map layer into an ESRI ARCGRID file |
r.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.bin | Exports a GRASS raster to a binary array |
r.out.png | Export GRASS raster as non-georeferenced PNG image
format |
r.out.ppm | Converts a GRASS raster map 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.pov | Converts a raster map layer into a height-field file for
POVRAY |
r.out.tiff | Exports a GRASS raster map 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) |
表 15: GRASS Toolbox: Vector data import modules
Vector data import modules in the GRASS
Toolbox |
Module name | Purpose |
v.in.dxf | Import DXF vector layer |
v.in.e00 | Import ESRI E00 file in a vector map |
v.in.garmin | Import vector from gps using gpstrans |
v.in.gpsbabel | Import vector from gps using gpsbabel |
v.in.mapgen | Import MapGen or MatLab vectors in GRASS |
v.in.ogr | Import OGR/PostGIS vector layers |
v.in.ogr.qgis | Import loaded vector layers into GRASS binary
vector map |
v.in.ogr.loc | Import OGR/PostGIS vector layers and create a fitted
location |
v.in.ogr.qgis.loc | Import loaded vector layers into GRASS binary
vector map and create a fitted location |
v.in.ogr.all | Import all the OGR/PostGIS vector layers in a given
data source |
v.in.ogr.all.loc | Import all the OGR/PostGIS vector layers in a
given data source and create a fitted location |
表 16: GRASS Toolbox: Vector data export modules
Vector data export modules in the GRASS
Toolbox |
Module name | Purpose |
v.out.ogr | Export vector layer to various formats (OGR library) |
v.out.ogr.gml | Export vector layer to GML |
v.out.ogr.postgis | Export vector layer to various formats (OGR
library) |
v.out.ogr.mapinfo | Mapinfo export of vector layer |
v.out.ascii | Convert a GRASS binary vector map to a GRASS ASCII
vector map |
v.out.dxf | converts a GRASS vector map to DXF |
GRASS Toolbox data type conversion modules
This Section lists all graphical dialogs in the GRASS Toolbox to convert
raster to vector or vector to raster data in a currently selected GRASS location
and mapset.
表 17: GRASS Toolbox: Data type conversion modules
Data type conversion modules in the GRASS
Toolbox |
Module name | Purpose |
r.to.vect.point | Convert a raster to vector points |
r.to.vect.line | Convert a raster to vector lines |
r.to.vect.area | Convert a raster to vector areas |
v.to.rast.constant | Convert a vector to raster using constant |
v.to.rast.attr | Convert a vector to raster using attribute values |
GRASS Toolbox region and projection configuration modules
This Section lists all graphical dialogs in the GRASS Toolbox to manage and
change the current mapset region and to configure your projection.
表 18: GRASS Toolbox: Region and projection configuration modules
Region and projection configuration
modules in the GRASS Toolbox |
Module name | Purpose |
g.region.save | Save the current region as a named region |
g.region.zoom | Shrink the current region until it meets non-NULL
data from a given raster map |
g.region.multiple.raster | Set the region to match multiple raster
maps |
g.region.multiple.vector | Set the region to match multiple vector
maps |
g.proj.print | Print projection information of the current location |
g.proj.geo | Print projection information from a georeferenced file
(raster, vector or image) |
g.proj.ascii.new | Print projection information from a
georeferenced ASCII file containing a WKT projection description |
g.proj.proj | Print projection information from a PROJ.4 projection
description file |
g.proj.ascii.new | Print projection information from a georeferenced
ASCII file containing a WKT projection description and create a new location based on it |
g.proj.geo.new | Print projection information from a georeferenced
file (raster, vector or image) and create a new location based on it |
g.proj.proj.new | Print projection information from a PROJ.4
projection description file and create a new location based on it |
m.cogo | A simple utility for converting bearing and distance
measurements to coordinates and vice versa. It assumes a cartesian coordinate system |
GRASS Toolbox raster data modules
This Section lists all graphical dialogs in the GRASS Toolbox to work with
and analyse raster data in a currently selected GRASS location and mapset.
表 19: GRASS Toolbox: Develop raster map modules
Develop raster map modules in the GRASS
Toolbox |
Module name | Purpose |
r.compress | Compresses and decompresses raster maps |
r.region.region | Sets the boundary definitions to current or
default region |
r.region.raster | Sets the boundary definitions from existent raster
map |
r.region.vector | Sets the boundary definitions from existent vector map |
r.region.edge | Sets the boundary definitions by edge (n-s-e-w) |
r.region.alignTo | Sets region to align to a raster map |
r.null.val | Transform cells with value in null cells |
r.null.to | Transform null cells in value cells |
r.quant | This routine produces the quantization file for a
floating-point map |
r.resamp.stats | Resamples raster map layers using aggregation |
r.resamp.interp | Resamples raster map layers using interpolation |
r.resample | GRASS raster map layer data resampling capability.
Before you must set new resolution |
r.resamp.rst | Reinterpolates and computes topographic analysis
using regularized spline with tension and smoothing |
r.support | Allows creation and/or modification of raster map layer
support files |
r.support.stats | Update raster map statistics |
r.proj | Re-project a raster map from one location to the current
location |
表 20: GRASS Toolbox: Raster color management modules
Raster color management modules in the
GRASS Toolbox |
Module name | Purpose |
r.colors.table | Set raster color table from setted tables |
r.colors.rules | Set raster color table from setted rules |
r.colors.rast | Set raster color table from existing raster |
r.blend | Blend color components for two raster maps by given ratio |
r.composite | Blend red, green, raster layers to obtain one color
raster |
r.his | Generates red, green and blue raster map layers combining
hue, intensity, and saturation (his) values from user-specified input
raster map layers |
表 21: GRASS Toolbox: Spatial raster analysis modules
Spatial raster analysis modules in the
GRASS Toolbox |
Module name | Purpose |
r.buffer | Raster buffer |
r.mask | Create a MASK for limiting raster operation |
r.mapcalc | Raster map calculator |
r.mapcalculator | Simple map algebra |
r.neighbors | Raster neighbors analyses |
v.neighbors | Count of neighbouring points |
r.cross | Create a cross product of the category value from multiple
raster map layers |
r.series | Makes each output cell a function of the values assigned
to the corresponding cells in the output raster map layers |
r.patch | Create a new raster map by combining other raster maps |
r.statistics | Category or object oriented statistics |
r.cost | Outputs a raster map layer showing the cumulative cost of
moving between different geographic locations on an input raster map layer
whose cell category values represent cost |
r.drain | Traces a flow through an elevation model on a raster map
layer |
r.shaded.relief | Create shaded map |
r.slope.aspect.slope | Generate slope map from DEM (digital
elevation model) |
r.slope.aspect.aspect | Generate aspect map from DEM (digital
elevation model) |
r.param.scale | Extracts terrain parameters from a DEM |
r.texture | Generate images with textural features from a raster map
(first serie of indices) |
r.texture.bis | Generate images with textural features from a raster
map (second serie of indices) |
r.los | Line-of-sigth raster analysis |
r.clump | Recategorizes into unique categories contiguous cells |
r.grow | Generates a raster map layer with contiguous areas grown by
one cell |
r.thin | Thin no-zero cells that denote line features |
表 22: GRASS Toolbox: Surface management modules
Surface management modules in the GRASS
Toolbox |
Module name | Purpose |
r.random | Creates a random vector point map contained in a raster |
r.random.cells | Generates random cell values with spatial
dependence |
v.kernel | Gaussian kernel density |
r.contour | Produces a contours vector map with specified step from
a raster map |
r.contour2 | Produces a contours vector map of specified contours
from a raster map |
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 |
r.surf.random | Produces a raster map layer of uniform random
deviates whose range can be expressed by the user |
r.bilinear | Bilinear interpolation utility for raster map layers |
v.surf.bispline | Bicubic or bilinear spline interpolation with
Tykhonov regularization |
r.surf.idw | Surface interpolation utility for raster map layers |
r.surf.idw2 | Surface generation program |
r.surf.contour | Surface generation program from rasterized contours |
v.surf.idw | Interpolate attribute values (IDW) |
v.surf.rst | Interpolate attribute values (RST) |
r.fillnulls | Fills no-data areas in raster maps using v.surf.rst
splines interpolation |
表 23: GRASS Toolbox: Change raster category values and labels modules
Raster category and label modules in the GRASS Toolbox |
Module name | Purpose |
r.reclass.area.greater | Reclasses a raster map greater than user
specified area size (in hectares) |
r.reclass.area.lesser | Reclasses a raster map less than user
specified area size (in hectares) |
r.reclass | Reclass a raster using a reclassification rules file |
r.recode | Recode raster maps |
r.rescale | Rescales the range of category values in a raster map
layer |
表 24: GRASS Toolbox: Hydrologic modelling modules
Hydrologic modelling modules in the GRASS
Toolbox |
Module name | Purpose |
r.carve | Takes vector stream data, transforms it to raster, and
subtracts depth from the output DEM |
r.fill.dir | Filters and generates a depressionless elevation map
and a flow direction map from a given elevation layer |
r.lake.xy | Fills lake from seed point at given level |
r.lake.seed | Fills lake from seed at given level |
r.topidx | Creates a 3D volume map based on 2D elevation and value
raster maps |
r.basins.fill | Generates a raster map layer showing watershed
subbasins |
r.water.outlet | Watershed basin creation program |
表 25: GRASS Toolbox: Reports and statistic analysis modules
Reports and statistic analysis modules in the GRASS Toolbox |
Module name | Purpose |
r.category | Prints category values and labels associated with
user-specified raster map layers |
r.sum | Sums up the raster cell values |
r.report | Reports statistics for raster map layers |
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.median | Finds the median of values in a cover map within areas
assigned the same category value in a user-specified base map |
r.mode | Finds the mode of values in a cover map within areas
assigned the same category value in a user-specified base map.reproject
raster image |
r.volume | Calculates the volume of data clumps, and produces a
GRASS vector points map containing the calculated centroids of these clumps |
r.surf.area | Surface area estimation for rasters |
r.univar | Calculates univariate statistics from the non-null cells
of a raster map |
r.covar | Outputs a covariance/correlation matrix for user-specified
raster map layer(s) |
r.regression.line | Calculates linear regression from two raster
maps: y = a + b * x |
r.coin | Tabulates the mutual occurrence (coincidence) of categories
for two raster map layers |
GRASS Toolbox vector data modules
This Section lists all graphical dialogs in the GRASS Toolbox to work with
and analyse vector data in a currently selected GRASS location and mapset.
表 26: GRASS Toolbox: Develop vector map modules
Develop vector map modules in the GRASS
Toolbox |
Module name | Purpose |
v.build.all | Rebuild topology of all vectors in the mapset |
v.clean.break | Break lines at each intersection of vector map |
v.clean.snap | Cleaning topology: snap lines to vertex in threshold |
v.clean.rmdangles | Cleaning topology: remove dangles |
v.clean.chdangles | Cleaning topology: change the type of boundary
dangle to line |
v.clean.rmbridge | Remove bridges connecting area and island or 2
islands |
v.clean.chbridge | Change the type of bridges connecting area and
island or 2 islands |
v.clean.rmdupl | Remove duplicate lines (pay attention to
categories!) |
v.clean.rmdac | Remove duplicate area centroids |
v.clean.bpol | Break polygons. Boundaries are broken on each
point shared between 2 and more polygons where angles of segments are
different |
v.clean.prune | Remove vertices in threshold from lines and
boundaries |
v.clean.rmarea | Remove small areas (removes longest boundary with
adjacent area) |
v.clean.rmline | Remove all lines or boundaries of zero length |
v.clean.rmsa | Remove small angles between lines at nodes |
v.type.lb | Convert lines to boundaries |
v.type.bl | Convert boundaries to lines |
v.type.pc | Convert points to centroids |
v.type.cp | Convert centroids to points |
v.centroids | Add missing centroids to closed boundaries |
v.build.polylines | Build polylines from lines |
v.segment | Creates points/segments from input vector lines and
positions |
v.to.points | Create points along input lines |
v.parallel | Create parallel line to input lines |
v.dissolve | Dissolves boundaries between adjacent areas |
v.drape | Convert 2D vector to 3D vector by sampling of elevation
raster |
v.transform | Performs an affine transformation on a vector map |
v.proj | Allows projection conversion of vector files |
v.support | Updates vector map metadata |
generalize | Vector based generalization |
表 27: GRASS Toolbox: Database connection modules
Database connection modules in the GRASS
Toolbox |
Module name | Purpose |
v.db.connect | Connect a vector to database |
v.db.sconnect | Disconnect a vector from database |
v.db.what.connect | Set/Show database connection for a vector |
表 28: GRASS Toolbox: Change vector field modules
Change vector field modules in the GRASS
Toolbox |
Module name | Purpose |
v.category.add | Add elements to layer (ALL elements of the selected
layer type!) |
v.category.del | Delete category values |
v.category.sum | Add a value to the current category values |
v.reclass.file | Reclass category values using a rules file |
v.reclass.attr | Reclass category values using a column attribute
(integer positive) |
表 29: GRASS Toolbox: Working with vector points modules
Working with vector points modules in the GRASS Toolbox |
Module name | Purpose |
v.in.region | Create new vector area map with current region extent |
v.mkgrid.region | Create grid in current region |
v.in.db | Import vector points from a database table containing
coordinates |
v.random | Randomly generate a 2D/3D GRASS vector point map |
v.kcv | Randomly partition points into test/train sets |
v.outlier | Romove outliers from vector point data |
v.hull | Create a convex hull |
v.delaunay.line | Delaunay triangulation (lines) |
v.delaunay.area | Delaunay triangulation (areas) |
v.voronoi.line | Voronoi diagram (lines) |
v.voronoi.area | Voronoi diagram (areas) |
表 30: GRASS Toolbox: Spatial vector and network analysis modules
Spatial vector and network analysis modules in the GRASS
Toolbox |
Module name | Purpose |
v.extract.where | Select features by attributes |
v.extract.list | Extract selected features |
v.select.overlap | Select features overlapped by features in another
map |
v.buffer | Vector buffer |
v.distance | Find the nearest element in vector 'to' for elements in
vector 'from'. |
v.net.nodes | Create nodes on network |
v.net.alloc | Allocate network |
v.net.iso | Cut network by cost isolines |
v.net.salesman | Connect nodes by shortest route (traveling
salesman) |
v.net.steiner | Connect selected nodes by shortest tree (Steiner
tree) |
v.patch | Create a new vector map by combining other vector maps |
v.overlay.or | Vector union |
v.overlay.and | Vector intersection |
v.overlay.not | Vector subtraction |
v.overlay.xor | Vector non-intersection |
表 31: GRASS Toolbox: Vector update by other maps modules
Vector update by other maps modules in the GRASS
Toolbox |
Module name | Purpose |
v.rast.stats | Calculates univariate statistics from a GRASS raster
map based on vector objects |
v.what.vect | Uploads map for which to edit attribute table |
v.what.rast | Uploads raster values at positions of vector points to
the table |
v.sample | Sample a raster file at site locations |
表 32: GRASS Toolbox: Vector report and statistic modules
Vector report and statistic modules in the GRASS
Toolbox |
Module name | Purpose |
v.to.db | Put geometry variables in database |
v.report | Reports geometry statistics for vectors |
v.univar | Calculates univariate statistics on selected table column
for a GRASS vector map |
v.normal | Tests for normality for points |
GRASS Toolbox imagery data modules
This Section lists all graphical dialogs in the GRASS Toolbox to work with
and analyse imagery data in a currently selected GRASS location and mapset.
表 33: GRASS Toolbox: Imagery analysis modules
Imagery analysis modules in the GRASS
Toolbox |
Module name | Purpose |
i.image.mosaik | Mosaic up to 4 images |
i.rgb.his | Red Green Blue (RGB) to Hue Intensity Saturation (HIS)
raster map color transformation function |
i.his.rgb | Hue Intensity Saturation (HIS) to Red Green Blue (RGB)
raster map color transform function |
i.landsat.rgb | Auto-balancing of colors for LANDSAT images |
i.fusion.brovey | Brovey transform to merge multispectral and
high-res pancromatic channels |
i.zc | Zero-crossing edge detection raster function for image
processing |
i.mfilter | |
i.tasscap4 | Tasseled Cap (Kauth Thomas) transformation for
LANDSAT-TM 4 data |
i.tasscap5 | Tasseled Cap (Kauth Thomas) transformation for
LANDSAT-TM 5 data |
i.tasscap7 | Tasseled Cap (Kauth Thomas) transformation for
LANDSAT-TM 7 data |
i.fft | Fast fourier transform (FFT) for image processing |
i.ifft | Inverse fast fourier transform for image processing |
r.describe | Prints terse list of category values found in a raster
map layer |
r.bitpattern | Compares bit patterns with a raster map |
r.kappa | Calculate error matrix and kappa parameter for accuracy
assessment of classification result |
i.oif | Calculates optimal index factor table for landsat tm bands |
GRASS Toolbox database modules
This Section lists all graphical dialogs in the GRASS Toolbox to manage,
connect and work with internal and external databases. Working with spatial
external databases is enabled via OGR and not covered by these modules.
表 34: GRASS Toolbox: Database modules
Database management and analysis modules in the GRASS
Toolbox |
Module name | Purpose |
db.connect | Sets general DB connection mapset |
db.connect.schema | Sets general DB connection mapset with a schema |
v.db.reconnect.all | Reconnect vector to a new database |
db.login | Set user/password for driver/database |
db.in.ogr | Imports attribute tables in various formats |
v.db.addtable | Create and add a new table to a vector |
v.db.addcol | Adds one or more columns to the attribute table
connected to a given vector map |
v.db.dropcol | Drops a column from the attribute table connected to
a given vector map |
v.db.renamecol | Renames a column in a attribute table connected to
a given vector map |
v.db.update_const | Allows to assign a new constant value to a
column |
v.db.update_query | Allows to assign a new constant value to a
column only if the result of a query is TRUE |
v.db.update_op | Allows to assign a new value, result of operation
on column(s), to a column in the attribute table connected to a given map |
v.db.update_op_query | Allows to assign a new value to a column,
result of operation on column(s), only if the result of a query is TRUE |
db.execute | Execute any SQL statement |
db.select | Prints results of selection from database based on SQL |
v.db.select | Prints vector map attributes |
v.db.select.where | Prints vector map attributes with SQL |
v.db.join | Allows to join a table to a vector map table |
v.db.univar | Calculates univariate statistics on selected table
column for a GRASS vector map |
GRASS Toolbox 3D modules
This Section lists all graphical dialogs in the GRASS Toolbox to work with 3D
data. GRASS provides more modules, but they are currently only available using
the GRASS Shell.
表 35: GRASS Toolbox: 3D Visualization
3D visualization and analysis modules in the GRASS
Toolbox |
Module name | Purpose |
nviz | Open 3D-View in nviz |
GRASS Toolbox help modules
The GRASS GIS Reference Manual offers a complete overview of the available
GRASS modules, not limited to the modules and their often reduced functionalities
implemented in the GRASS Toolbox.
表 36: GRASS Toolbox: Reference Manual
Reference Manual modules in the GRASS
Toolbox |
Module name | Purpose |
g.manual | Display the HTML manual pages of GRASS |