GRASS logo

NAME

t.rast.aggregate.patch - Aggregate multiple space time raster maps into mosaics with the given granualrity using r.patch or r.buildvrt.

KEYWORDS

temporal, aggregation, patch, raster, merge, patching, granularity, strds

SYNOPSIS

t.rast.aggregate.patch
t.rast.aggregate.patch --help
t.rast.aggregate.patch [-enzsv] input=name [where=sql_query] [sort=string] output=name [title=string] [description=string] [basename=string] [offset=integer] [suffix=string] granularity=string [sampling=name[,name,...]] [nprocs=integer] [region_relation=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-e
Extend existing STRDS (requires overwrite flag)
-n
Register Null maps
-z
Use zero (0) for transparency instead of NULL
-s
Do not create color and category files
-v
Patch to virtual raster map (r.buildvrt)
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

input=name [required]
Name of the input space time raster dataset
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'
sort=string
Sort order of input maps using start_time (default: desc = newest first)
Options: asc, desc
Default: desc
output=name [required]
Name of the output space time raster dataset
title=string
Title of the resulting STRDS
description=string
Description of the resulting STRDS
basename=string
Basename for output raster maps
offset=integer
Offset that is used to create the output map ids, output map id is generated as: basename_ (count + offset)
Default: 0
suffix=string
Suffix to add at basename: set 'gran' for granularity, 'time' for the full time format, 'num' for numerical suffix with a specific number of digits (default %05)
Default: gran
granularity=string [required]
Aggregation granularity, format absolute time "x years, x months, x weeks, x days, x hours, x minutes, x seconds" or an integer value for relative time
sampling=name[,name,...]
The method to be used for sampling the input dataset
Options: equal, overlaps, overlapped, starts, started, finishes, finished, during, contains
Default: contains
nprocs=integer
Number of threads for parallel computing
Default: 1
region_relation=string
Process only maps with this spatial relation to the current computational region
Options: overlaps, contains, is_contained

Table of contents

DESCRIPTION

t.rast.aggregate.patch aggregates raster maps within a space time raster dataset (STRDS) using r.patch or r.buildvrt. Hence, it is a simple wrapper for those two raster modules and written oriented on t.rast.aggregate

By default r.patch is used to create a patched raster map. Especially for temporary data, using r.buildvrt for patching can be advantageous with regards to processing time and storage space. r.buildvrt creates a virtual raser map and is used when the v-flag is given. The v-flag excludes the z-flag (using zero (0) for transperancy) and s-flag (do not create color and category files).

Both input and output of this module is a single space time raster dataset. A subset of the input space time raster dataset can be selected using the where option. In addition, input maps can be filtered spatially using the region_relation option.

The raster map layers in the input STRDS are grouped and patched using the given granularity and the semantic_label assigned to the input raster maps.

If present, the semantic label is written into the name of the resulting raster maps. The naming pattern for output raster maps is basename, semantic_label, suffix separated by underscore.

The sorting of the raster map layer can be set using the sort option. Be aware that the sorting of the maps significantly influences the result if input maps overlap spatially. By default the maps are sorted in descending order (desc) using start_time so that the newest raster map is the first input map in r.patch/r.buildvrt, thus ends up on top of the mosaic.

The resulting raster maps can also be registered into an existing Space Time Raster Dataset if the e-flag and --overwrite flags are set.

Please note that the color table of the first input raster is used for the resulting map when the v-flag is used. Values in the resulting raster map that exeed the range of that first raster map will then be rendered on the screen like no data. In that case, please update the color table or the resulting map with t.rast.colors

EXAMPLE

The example uses the North Carolina extra time series of MODIS Land Surface Temperature maps (download). (The mapset has to be unzip in one of the North Carolina locations.)

Patching the MODIS Land Surface Temperature for 2016 (filling missing pixels by subsequent maps in the time series):

t.rast.aggregate.patch input=LST_Day_monthly@modis_lst output=LST_Day_patched_2016 \
  --overwrite --verbose -v title=LST_Day_patched description=LST_Day_patched \
  granularity="1 year" basename=LST_Day_patched \
  where="start_time >= '2016-01' and start_time <= '2016-12'"
t.info LST_Day_patched_2016

Patching the MODIS Land Surface Temperature for 2016 (filling missing pixels by subsequent maps in the time series) using a virtual mosaic (r.buildvrt):

t.rast.aggregate.patch input=LST_Day_monthly@modis_lst output=LST_Day_patched_2016_vrt \
  --overwrite --verbose -v title=LST_Day_patched description=LST_Day_patched \
  granularity="1 year" basename=LST_Day_patched \
  where="start_time >= '2016-01' and start_time <= '2016-12'"
# Assign a new color table that covers the entire range of the resulting map
t.rast.colors input=LST_Day_patched_2016_vrt color=grey
t.info LST_Day_patched_2016_vrt

SEE ALSO

r.buildvrt, r.patch, t.rast.aggregate, t.rast.series, t.create, t.info, t.merge t.rast.patch,

Temporal data processing Wiki

AUTHOR

Stefan Blumentrath, NVE

SOURCE CODE

Available at: t.rast.aggregate.patch source code (history)

Accessed: Monday Sep 16 09:38:12 2024


Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.4.0 Reference Manual