[GRASS-dev] Re: [GRASS GIS] #1031: More specific parameter information in command line help

GRASS GIS trac at osgeo.org
Mon Apr 12 09:16:57 EDT 2010


#1031: More specific parameter information in command line help
--------------------------+-------------------------------------------------
  Reporter:  huhabla      |       Owner:  grass-dev at lists.osgeo.org
      Type:  enhancement  |      Status:  new                      
  Priority:  minor        |   Milestone:  7.0.0                    
 Component:  libgis       |     Version:  svn-trunk                
Resolution:               |    Keywords:  parser, help             
  Platform:  All          |         Cpu:  All                      
--------------------------+-------------------------------------------------
Comment (by huhabla):

 I have attached a patch for lib/gis/parser_help.c and
 lib/gis/parser_stanndard_options.c which implements the discussed ideas.

 Examples:

 {{{
 lib/gis> r.neighbors help

 Description:
  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.

 Keywords:
  raster

 Usage:
  r.neighbors [-ac] input=raster [selection=raster] output=raster
    [method=string] [size=value] [title=phrase] [weight=filename]
    [gauss=value] [quantile=value] [--overwrite] [--verbose] [--quiet]

 Flags:
   -a   Do not align output with the input
   -c   Use circular neighborhood
  --o   Allow output files to overwrite existing files
  --v   Verbose module output
  --q   Quiet module output

 Parameters:
       input   Name of input raster map
   selection   Name of an input raster map to select the cells which should
 be processed
               type: input
      output   Name for output raster map
      method   Neighborhood operation
               options: average,median,mode,minimum,maximum,stddev,sum,
 variance,diversity,interspersion,quart1,quart3,perc90,
                        quantile
               default: average
        size   Neighborhood size
               default: 3
       title   Title of the output raster map
      weight   Text file containing weights
       gauss   Sigma (in cells) for Gaussian filter
    quantile   Quantile to calculate for method=quantile
               options: 0.0-1.0
               default: 0.5
 }}}

 {{{
 lib/gis> r.buffer2 help

 Description:
  Creates a raster map layer showing buffer zones surrounding cells that
 contain non-NULL category values.

 Keywords:
  raster, buffer

 Usage:
  r.buffer2 [-z] input=raster output=raster distances=value[,value,...]
    [units=string] [--overwrite] [--verbose] [--quiet]

 Flags:
   -z   Ignore zero (0) data cells instead of NULL cells
  --o   Allow output files to overwrite existing files
  --v   Verbose module output
  --q   Quiet module output

 Parameters:
       input   Name of input raster map
      output   Name for output raster map
   distances   Distance zone(s)
       units   Units of distance
               options: meters,kilometers,feet,miles,nautmiles
               default: meters
 }}}

 {{{
 lib/gis> r.gwflow help

 Description:
  Numerical calculation program for transient, confined and unconfined
 groundwater flow in two dimensions.

 Keywords:
  raster, groundwater flow

 Usage:
  r.gwflow [-f] phead=raster status=raster hc_x=raster hc_y=raster
    [q=raster] s=raster [recharge=raster] top=raster bottom=raster
    output=raster [vx=raster] [vy=raster] [budget=raster] type=string
    [river_bed=raster] [river_head=raster] [river_leak=raster]
    [drain_bed=raster] [drain_leak=raster] dt=value [maxit=value]
    [error=value] [solver=name] [--overwrite] [--verbose] [--quiet]

 Flags:
   -f   Allocate a full quadratic linear equation system, default is a
 sparse linear equation system.
  --o   Allow output files to overwrite existing files
  --v   Verbose module output
  --q   Quiet module output

 Parameters:
        phead   The initial piezometric head in [m]
                type: input
       status   Boundary condition status, 0-inactive, 1-active,
 2-dirichlet
                type: input
         hc_x   X-part of the hydraulic conductivity tensor in [m/s]
                type: input
         hc_y   Y-part of the hydraulic conductivity tensor in [m/s]
                type: input
            q   Raster map water sources and sinks in [m^3/s]
                type: input
            s   Specific yield in [1/m]
                type: input
     recharge   Recharge map e.g: 6*10^-9 per cell in [m^3/s*m^2]
                type: input
          top   Top surface of the aquifer in [m]
                type: input
       bottom   Bottom surface of the aquifer in [m]
                type: input
       output   The map storing the numerical result [m]
           vx   Calculate and store the groundwater filter velocity vector
 part in x direction [m/s]
                type: output
           vy   Calculate and store the groundwater filter velocity vector
 part in y direction [m/s]
                type: output
       budget   Store the groundwater budget for each cell [m^3/s]
                type: output
         type   The type of groundwater flow
                options: confined,unconfined
                default: confined
    river_bed   The height of the river bed in [m]
                type: input
   river_head   Water level (head) of the river with leakage connection in
 [m]
                type: input
   river_leak   The leakage coefficient of the river bed in [1/s].
                type: input
    drain_bed   The height of the drainage bed in [m]
                type: input
   drain_leak   The leakage coefficient of the drainage bed in [1/s]
                type: input
           dt   The calculation time in seconds
                default: 86400
        maxit   Maximum number of iteration used to solver the linear
 equation system
                default: 100000
        error   Error break criteria for iterative solvers (jacobi, sor, cg
 or bicgstab)
                default: 0.0000000001
       solver   The type of solver which should solve the symmetric linear
 equation system
                options: cg,pcg,cholesky
                default: cg
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1031#comment:5>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list