2
# -*- coding: utf-8 -*-
3
############################################################################
5
# MODULE: t.rast.export
6
# AUTHOR(S): Soeren Gebbert
8
# PURPOSE: Export a space time raster dataset
9
# COPYRIGHT: (C) 2011-2014 by the GRASS Development Team
11
# This program is free software under the GNU General Public
12
# License (version 2). Read the file COPYING that comes with GRASS
15
#############################################################################
18
#% description: Exports space time raster dataset.
24
#%option G_OPT_STRDS_INPUT
27
#%option G_OPT_F_OUTPUT
28
#% description: Name of a space time raster dataset archive
33
#% description: Path to the work directory, default is /tmp
41
#% description: Compression method of the tar archive
44
#% options: no,gzip,bzip2
51
#% label: The export format of a single raster map
52
#% description: Supported are GTiff, AAIGrid via r.out.gdal and the GRASS package format of r.pack
55
#% options: GTiff,AAIGrid,pack
59
#%option G_OPT_T_WHERE
62
import grass.script as grass
63
import grass.temporal as tgis
66
############################################################################
70
_input = options["input"]
71
output = options["output"]
72
compression = options["compression"]
73
directory = options["directory"]
74
where = options["where"]
75
_format = options["format"]
77
# Make sure the temporal database exists
79
# Export the space time raster dataset
81
_input, output, compression, directory, where, _format, "strds")
83
############################################################################
84
if __name__ == "__main__":
85
options, flags = grass.parser()