File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
python/plugins/processing/algs/grass7 Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ v.to.3d
2
+ Performs transformation of 2D vector features to 3D.
3
+ Vector (v.*)
4
+ ParameterVector|input|Name of input vector map|-1|False
5
+ ParameterString|height|Fixed height for 3D vector features (float)|None|False|True
6
+ ParameterTableField|column|Name of attribute column used for height|input|0|True
7
+ OutputVector|output|3D
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ ***************************************************************************
5
+ v_to_3d.py
6
+ ----------
7
+ Date : March 2016
8
+ Copyright : (C) 2016 by Médéric Ribreux
9
+ Email : medspx at medspx dot fr
10
+ ***************************************************************************
11
+ * *
12
+ * This program is free software; you can redistribute it and/or modify *
13
+ * it under the terms of the GNU General Public License as published by *
14
+ * the Free Software Foundation; either version 2 of the License, or *
15
+ * (at your option) any later version. *
16
+ * *
17
+ ***************************************************************************
18
+ """
19
+
20
+ __author__ = 'Médéric Ribreux'
21
+ __date__ = 'March 2016'
22
+ __copyright__ = '(C) 2016, Médéric Ribreux'
23
+
24
+ # This will get replaced with a git SHA1 when you do a git archive
25
+
26
+ __revision__ = '$Format:%H$'
27
+
28
+
29
+ def checkParameterValuesBeforeExecuting (alg ):
30
+ """ Verify if we have the right parameters """
31
+ height = alg .getParameterValue ('height' )
32
+ column = alg .getParameterValue ('column' )
33
+ if (height and column ) or (not height and not column ):
34
+ return alg .tr ("You need to set either a fixed height value or the height column!" )
35
+
36
+ return None
You can’t perform that action at this time.
0 commit comments