-
Notifications
You must be signed in to change notification settings - Fork 0
/
importer.py
executable file
·57 lines (49 loc) · 1.38 KB
/
importer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python3
############################################################################
#
# MODULE: Actinia importer
#
# AUTHOR(S): Soeren Gebbert
#
# Original source: https://github.com/mundialis/actinia_core/blob/master/scripts/importer/
#
# PURPOSE: Facilitates creation of raster MASK
#
# COPYRIGHT: (C) 2018-2019 by Sören Gebbert and mundialis GmbH & Co. KG
#
# This program is free software under the GNU General Public
# License (>=v3). Read the file COPYING that comes with GRASS
# for details.
#
#############################################################################
#%module
#% description: Actinia importer module supporting raster and vector data.
#% keyword: actinia
#% keyword: import
#% keyword: raster
#% keyword: vector
#% overwrite: no
#%end
#%option G_OPT_R_INPUT
#% key: raster
#% description: Name of raster map to be imported by actinia
#% required: NO
#% guisection: Raster
#%end
#%option G_OPT_V_INPUT
#% key: vector
#% label: Name of vector map to be imported by actinia
#% required: NO
#% guisection: Vector
#%end
import os
import grass.script as grass
# i18N
import gettext
gettext.install('grassmods', os.path.join(os.getenv("GISBASE"), 'locale'))
def main():
raster = options['raster']
vector = options['vector']
if __name__ == "__main__":
options, flags = grass.parser()
main()