Skip to content

i.lmf

Performs Temporal Local Maximum Fitting of vegetation indices, works also for surface reflectance data.

i.lmf input=name [,name,...] ndate=integer output=name [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

i.lmf input=name ndate=0 output=name

grass.script.run_command("i.lmf", input, ndate, output, overwrite=None, verbose=None, quiet=None, superquiet=None)

Example:

gs.run_command("i.lmf", input="name", ndate=0, output="name")

grass.tools.Tools.i_lmf(input, ndate, output, overwrite=None, verbose=None, quiet=None, superquiet=None)

Example:

tools = Tools()
tools.i_lmf(input="name", ndate=0, output="name")

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

Parameters

input=name [,name,...] [required]
    Names of input layers
ndate=integer [required]
    Number of map layers per year
output=name [required]
    Name of the output layer
--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

input : str | list[str], required
    Names of input layers
    Used as: input, raster, name
ndate : int, required
    Number of map layers per year
    Used as: Atmospheric correction
output : str, required
    Name of the output layer
    Used as: output, raster, name
overwrite : bool, optional
    Allow output files to overwrite existing files
    Default: None
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

input : str | list[str], required
    Names of input layers
    Used as: input, raster, name
ndate : int, required
    Number of map layers per year
    Used as: Atmospheric correction
output : str | type(np.ndarray) | type(np.array) | type(gs.array.array), required
    Name of the output layer
    Used as: output, raster, name
overwrite : bool, optional
    Allow output files to overwrite existing files
    Default: None
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

i.lmf calculates the Local maximum fitting of a temporal image series, intially for vegetation indices, it also works for surface reflectance.

This is a first level port, only a fast fitting is done, see TODO.

The number of bands is potentially several years, nfiles and ndates are respectively the number of pixels and the number of pixels in a year.

NOTES

Original links are found here SAWADA, 2001: http://www.affrc.go.jp/ANDES/sawady/index.html NAGATANI et al., 2002: http://www.gisdevelopment.net/aars/acrs/2002/pos2/184.pdf Yann Chemin and Kiyoshi Honda repaired it and ported it from SGI/OpenMP to Linux. http://www.rsgis.ait.ac.th/\~honda/lmf/lmf.html

TODO

Port the full detailed algorithm from Fortran, and vastly unemcomber/clean it. It will make the algorithm must slower though, gaining only a marginal fitting strength, for my actual experience with VIs curves.

SEE ALSO

r.series

AUTHOR

Yann Chemin, International Rice Research Institute, The Philippines

SOURCE CODE

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