~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to temporal/t.rast.export/t.rast.export.py

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# -*- coding: utf-8 -*-
 
3
############################################################################
 
4
#
 
5
# MODULE:       t.rast.export
 
6
# AUTHOR(S):    Soeren Gebbert
 
7
#
 
8
# PURPOSE:      Export a space time raster dataset
 
9
# COPYRIGHT:    (C) 2011-2014 by the GRASS Development Team
 
10
#
 
11
#               This program is free software under the GNU General Public
 
12
#               License (version 2). Read the file COPYING that comes with GRASS
 
13
#               for details.
 
14
#
 
15
#############################################################################
 
16
 
 
17
#%module
 
18
#% description: Exports space time raster dataset.
 
19
#% keyword: temporal
 
20
#% keyword: export
 
21
#% keyword: raster
 
22
#%end
 
23
 
 
24
#%option G_OPT_STRDS_INPUT
 
25
#%end
 
26
 
 
27
#%option G_OPT_F_OUTPUT
 
28
#% description: Name of a space time raster dataset archive
 
29
#%end
 
30
 
 
31
#%option G_OPT_M_DIR
 
32
#% key: directory
 
33
#% description: Path to the work directory, default is /tmp
 
34
#% required: no
 
35
#% answer: /tmp
 
36
#%end
 
37
 
 
38
#%option
 
39
#% key: compression
 
40
#% type: string
 
41
#% description: Compression method of the tar archive
 
42
#% required: no
 
43
#% multiple: no
 
44
#% options: no,gzip,bzip2
 
45
#% answer: bzip2
 
46
#%end
 
47
 
 
48
#%option
 
49
#% key: format
 
50
#% type: string
 
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
 
53
#% required: no
 
54
#% multiple: no
 
55
#% options: GTiff,AAIGrid,pack
 
56
#% answer: GTiff
 
57
#%end
 
58
 
 
59
#%option G_OPT_T_WHERE
 
60
#%end
 
61
 
 
62
import grass.script as grass
 
63
import grass.temporal as tgis
 
64
 
 
65
 
 
66
############################################################################
 
67
def main():
 
68
 
 
69
    # Get the options
 
70
    _input = options["input"]
 
71
    output = options["output"]
 
72
    compression = options["compression"]
 
73
    directory = options["directory"]
 
74
    where = options["where"]
 
75
    _format = options["format"]
 
76
 
 
77
    # Make sure the temporal database exists
 
78
    tgis.init()
 
79
    # Export the space time raster dataset
 
80
    tgis.export_stds(
 
81
        _input, output, compression, directory, where, _format, "strds")
 
82
 
 
83
############################################################################
 
84
if __name__ == "__main__":
 
85
    options, flags = grass.parser()
 
86
    main()