Skip to content

r.texture.tiled

Runs r.texture in parallel over tiles

r.texture.tiled input=name output=basename method=string size=integer distance=integer tile_width=integer tile_height=integer processes=integer [mapset_prefix=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.texture.tiled input=name output=basename method=string size=3 distance=1 tile_width=1000 tile_height=1000 processes=1

grass.script.run_command("r.texture.tiled", input, output, method, size=3, distance=1, tile_width=1000, tile_height=1000, processes=1, mapset_prefix=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.texture.tiled", input="name", output="basename", method="string", size=3, distance=1, tile_width=1000, tile_height=1000, processes=1)

Parameters

input=name [required]
    Name of input raster map
output=basename [required]
    Name for output basename raster map(s)
method=string [required]
    Texture method to apply
    Allowed values: asm, contrast, corr, var, idm, sa, sv, se, entr, dv, de, moc1, moc2
size=integer [required]
    The size of moving window (odd and >= 3)
    Default: 3
distance=integer [required]
    The distance between two samples (>= 1)
    The distance must be smaller than the size of the moving window
    Default: 1
tile_width=integer [required]
    Width of tiles
    Default: 1000
tile_height=integer [required]
    Height of tiles
    Default: 1000
processes=integer [required]
    Number of parallel processes
    Default: 1
mapset_prefix=string
    Mapset prefix
--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, required
    Name of input raster map
    Used as: input, raster, name
output : str, required
    Name for output basename raster map(s)
    Used as: output, raster, basename
method : str, required
    Texture method to apply
    Allowed values: asm, contrast, corr, var, idm, sa, sv, se, entr, dv, de, moc1, moc2
size : int, required
    The size of moving window (odd and >= 3)
    Default: 3
distance : int, required
    The distance between two samples (>= 1)
    The distance must be smaller than the size of the moving window
    Default: 1
tile_width : int, required
    Width of tiles
    Default: 1000
tile_height : int, required
    Height of tiles
    Default: 1000
processes : int, required
    Number of parallel processes
    Default: 1
mapset_prefix : str, optional
    Mapset prefix
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

r.texture.tiled cuts a raster input map into tiles and runs r.texture over these tiles before patching the result together into a single output raster map.

The overlap between tiles is calculated internally in order to correspond to the window size in order to avoid any border effects.

Tiles can be defined with the tile_width, tile_height and overlap parameters. If processes is higher than one, these tiles will be processed in parallel.

The mapset_prefix parameter allows to make sure that the temporary mapsets created during the tiled processing have unique names. This is useful if the user runs r.texture.tiled several times in parallel (e.g. in an HPC environment).

NOTES

The parameters for texture calculation are identical to those of r.texture. Currently, this module only allows calculating one texture feature at a time. The n flag allowing null cells is automatically set in order to avoid issues at the border of the current computational region / of the input map.

EXAMPLE

Run r.texture over tiles with size 1000x1000 using 4 parallel processes:

g.region rast=ortho_2001_t792_1m
r.texture.tiled ortho_2001_t792_1m output=ortho_texture method=idm \
   tile_width=1000 tile_height=1000 processes=4

SEE ALSO

r.texture

AUTHOR

Moritz Lennert

SOURCE CODE

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