@@ -189,9 +189,9 @@ def getConsoleCommands(self, parameters, context, feedback):
189
189
inLayer = self .parameterAsSource (parameters , self .INPUT , context )
190
190
ogrLayer , layername = self .getOgrCompatibleSource (self .INPUT , parameters , context , feedback )
191
191
shapeEncoding = self .parameterAsString (parameters , self .SHAPE_ENCODING , context )
192
- ssrs = self .parameterAsCrs (parameters , self .S_SRS , context )
193
- tsrs = self .parameterAsCrs (parameters , self .T_SRS , context )
194
- asrs = self .parameterAsCrs (parameters , self .A_SRS , context )
192
+ ssrs = self .parameterAsCrs (parameters , self .S_SRS , context ). authid ()
193
+ tsrs = self .parameterAsCrs (parameters , self .T_SRS , context ). authid ()
194
+ asrs = self .parameterAsCrs (parameters , self .A_SRS , context ). authid ()
195
195
table = self .parameterAsString (parameters , self .TABLE , context )
196
196
schema = self .parameterAsString (parameters , self .SCHEMA , context )
197
197
pk = self .parameterAsString (parameters , self .PK , context )
@@ -271,13 +271,12 @@ def getConsoleCommands(self, parameters, context, feedback):
271
271
if len (asrs ) > 0 :
272
272
arguments .append ('-a_srs' )
273
273
arguments .append (asrs )
274
- if len (spat ) > 0 :
275
- regionCoords = spat .split (',' )
274
+ if not spat .isNull ():
276
275
arguments .append ('-spat' )
277
- arguments .append (regionCoords [ 0 ] )
278
- arguments .append (regionCoords [ 2 ] )
279
- arguments .append (regionCoords [ 1 ] )
280
- arguments .append (regionCoords [ 3 ] )
276
+ arguments .append (spat . xMinimum () )
277
+ arguments .append (spat . yMinimum () )
278
+ arguments .append (spat . xMaximum () )
279
+ arguments .append (spat . yMaximum () )
281
280
if clip :
282
281
arguments .append ('-clipsrc spat_extent' )
283
282
if skipfailures :
0 commit comments