Skip to content

t.rast.kappa

Calculate kappa parameter in a space time raster dataset

t.rast.kappa [-klp] strds=name [output=name] [weight=string] [where=sql_query] [splittingday=string] [separator=character] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

t.rast.kappa strds=name

grass.script.run_command("t.rast.kappa", strds, output="-", weight=None, where=None, splittingday=None, separator="pipe", flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("t.rast.kappa", strds="name")

Parameters

strds=name [required]
    Name of the input space time raster dataset
output=name
    Name for the output file or "-" in case stdout should be used
    Default: -
weight=string
    Specifies the weight matrix for the calculation
    Allowed values: linear, quadratic
where=sql_query
    WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
    Example: start_time > '2001-01-01 12:30:00'
splittingday=string
    Specifies the day to split the space time raster dataset in two groups, isotime format
separator=character
    Field separator
    Special characters: pipe, comma, space, tab, newline
    Default: pipe
-k
    Use r.kappa module instead SciKit-Learn Laboratory metrics.kappa
-l
    Use memory swap

-p
    Pixel by pixel analysis along different years

--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

strds : str, required
    Name of the input space time raster dataset
    Used as: input, strds, name
output : str, optional
    Name for the output file or "-" in case stdout should be used
    Used as: output, file, name
    Default: -
weight : str, optional
    Specifies the weight matrix for the calculation
    Allowed values: linear, quadratic
where : str, optional
    WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
    Example: start_time > '2001-01-01 12:30:00'
    Used as: sql_query
splittingday : str, optional
    Specifies the day to split the space time raster dataset in two groups, isotime format
separator : str, optional
    Field separator
    Special characters: pipe, comma, space, tab, newline
    Used as: input, separator, character
    Default: pipe
flags : str, optional
    Allowed values: k, l, p
    k
        Use r.kappa module instead SciKit-Learn Laboratory metrics.kappa
    l
        Use memory swap

    p
        Pixel by pixel analysis along different years

overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

The t.rast.kappa calculate kappa parameter in a space time raster dataset. It can calculate kappa values using two different algorithm, the one provided by r.kappa and the one provided by SciKit-Learn metrics library

EXAMPLE

Using r.kappa as backend

In this example t.rast.kappa is using r.kappa as backend, it return the results inside the /tmpem> directory into files with mystrds as prefix. weight option is not considered using r.kappa as backend.

        t.rast.kappa -k strds=mystrds output=/tmp/mystrds

Using SciKit-Learn as backend, text as output

In this example t.rast.kappa is using SciKit-Learn metrics library as backend, without output option, the module print the results to standard output

        t.rast.kappa strds=mystrds where="start_time >= '1999-12-01' weight='linear'

Using SciKit-Learn as backend, map as output

In this example t.rast.kappa is using SciKit-Learn metrics library as backend, the output is a map with the kappa values calculated for each pixel. The splittingday option is required to split the space time raster dataset in two groups and analyze them; the two groups must have the same number of maps, otherwise and error will be reported.

        t.rast.kappa -p strds=mystrds output=mykappa splittingday='2005-01-01'

SEE ALSO

r.kappa

AUTHOR

Luca Delucchi, Fondazione Edmund Mach

SOURCE CODE

Available at: t.rast.kappa source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819