@@ -45,6 +45,7 @@ class rasterize(OgrAlgorithm):
45
45
DIMENSIONS = 'DIMENSIONS'
46
46
WIDTH = 'WIDTH'
47
47
HEIGHT = 'HEIGHT'
48
+ EXTRA = 'EXTRA'
48
49
RTYPE = 'RTYPE'
49
50
OUTPUT = 'OUTPUT'
50
51
TYPE = ['Byte' , 'Int16' , 'UInt16' , 'UInt32' , 'Int32' , 'Float32' , 'Float64' ]
@@ -99,6 +100,8 @@ def defineCharacteristics(self):
99
100
self .tr ('Control whether the created file is a BigTIFF or a classic TIFF' ), self .BIGTIFFTYPE , 0 ))
100
101
self .addParameter (ParameterBoolean (self .TFW ,
101
102
self .tr ('Force the generation of an associated ESRI world file (.tfw)' ), False ))
103
+ params .append (ParameterString (self .EXTRA ,
104
+ self .tr ('Additional creation parameters' ), '' , optional = True ))
102
105
103
106
for param in params :
104
107
param .isAdvanced = True
@@ -119,6 +122,7 @@ def getConsoleCommands(self):
119
122
bigtiff = self .BIGTIFFTYPE [self .getParameterValue (self .BIGTIFF )]
120
123
tfw = unicode (self .getParameterValue (self .TFW ))
121
124
out = self .getOutputValue (self .OUTPUT )
125
+ extra = unicode (self .getParameterValue (self .EXTRA ))
122
126
123
127
arguments = []
124
128
arguments .append ('-a' )
@@ -156,7 +160,10 @@ def getConsoleCommands(self):
156
160
arguments .append ("-co TFW=YES" )
157
161
if len (bigtiff ) > 0 :
158
162
arguments .append ("-co BIGTIFF=" + bigtiff )
163
+ if len (extra ) > 0 :
164
+ arguments .append (extra )
159
165
arguments .append ('-l' )
166
+
160
167
arguments .append (self .ogrLayerName (inLayer ))
161
168
arguments .append (ogrLayer )
162
169
0 commit comments