Skip to content

r.mcda.ahp

Generates a raster map classified with analytic hierarchy process (AHP).

r.mcda.ahp [-k] criteria=name [,name,...] pairwise=string output=string [--verbose] [--quiet] [--qq] [--ui]

Example:

r.mcda.ahp criteria=name pairwise=string output=string

grass.script.run_command("r.mcda.ahp", criteria, pairwise, output, flags=None, verbose=None, quiet=None, superquiet=None)

Example:

gs.run_command("r.mcda.ahp", criteria="name", pairwise="string", output="string")

grass.tools.Tools.r_mcda_ahp(criteria, pairwise, output, flags=None, verbose=None, quiet=None, superquiet=None)

Example:

tools = Tools()
tools.r_mcda_ahp(criteria="name", pairwise="string", output="string")

This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.

Parameters

criteria=name [,name,...] [required]
    Name of criteria raster maps
pairwise=string [required]
    Pairwise comparison matrix
output=string [required]
    output classified raster map
-k
    build a void pairwise comparison matrix and exit (no yet implemented)
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

criteria : str | list[str], required
    Name of criteria raster maps
    Used as: input, raster, name
pairwise : str, required
    Pairwise comparison matrix
    Used as: input, input
output : str, required
    output classified raster map
    Used as: output
flags : str, optional
    Allowed values: k
    k
        build a void pairwise comparison matrix and exit (no yet implemented)
verbose : bool, optional
    Verbose module output
    Default: None
quiet : bool, optional
    Quiet module output
    Default: None
superquiet : bool, optional
    Very quiet module output
    Default: None

criteria : str | list[str], required
    Name of criteria raster maps
    Used as: input, raster, name
pairwise : str | io.StringIO, required
    Pairwise comparison matrix
    Used as: input, input
output : str | type(np.ndarray) | type(np.array) | type(gs.array.array), required
    output classified raster map
    Used as: output
flags : str, optional
    Allowed values: k
    k
        build a void pairwise comparison matrix and exit (no yet implemented)
verbose : bool, optional
    Verbose module output
    Default: None
quiet : bool, optional
    Quiet module output
    Default: None
superquiet : bool, optional
    Very quiet module output
    Default: None

Returns:

result : grass.tools.support.ToolResult | np.ndarray | tuple[np.ndarray] | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None will be returned. If an array type (e.g., np.ndarray) is used for one of the raster outputs, the result will be an array and will have the shape corresponding to the computational region. If an array type is used for more than one raster output, the result will be a tuple of arrays.

DESCRIPTION

The r.mcda.ahp Generate a raster map classified with analytic hierarchy process (AHP) [Saaty, 1977 and Saaty & Vargas, 1991]

NOTES

It is mandatory to build a pairwise comparation table with the same order of input of criteria maps in the criteria field.

Example: r.mcda.ahp criteria=reclass_slope,reclass_sand,reclass_elev pairwise=pairwise output=outputMap

The file "pairwise" has to have a structure like this:

#start file

1.0, 0.2, 3.0

5.0, 1.0, 5.0

0.3, 0.2, 1.0

#comment: order: reclass_slope,reclass_sand,reclass_

#end file

The first row and first column are related to the first criteria (reclass_slope in our case); the second row and second column are related to the second criteria (reclass_sand in our case) and the third row and third column are related to the third criteria ( reclass_elev in our cas), and so on.

In the work directory should be generated a log.txt file were you can find additional information like: eigenvectors, eigenvalues, weights

TODO

SEE ALSO

r.roughset, r.mcda.regime, r.mcda.fuzzy r.mcda.electre, r.mcda.roughset r.in.drsa r.to.drsa

AUTHORS

Antonio Boggia - Gianluca Massei
Department of Economics and Appraisal - University of Perugia - Italy

SOURCE CODE

Available at: r.mcda.ahp source code (history)
Latest change: Thursday Feb 20 20:36:19 2025 in commit 158e314