Skip to content
Permalink
Browse files

Followup fixes to ogr2ogrpostgis alg porting

  • Loading branch information
nyalldawson committed Aug 13, 2017
1 parent 1cbbb8a commit 3d3d2975a43ee5f8bb6c6e0d33ece11a8a1085fd
Showing with 8 additions and 9 deletions.
  1. +8 −9 python/plugins/processing/algs/gdal/ogr2ogrtopostgis.py
@@ -189,9 +189,9 @@ def getConsoleCommands(self, parameters, context, feedback):
inLayer = self.parameterAsSource(parameters, self.INPUT, context)
ogrLayer, layername = self.getOgrCompatibleSource(self.INPUT, parameters, context, feedback)
shapeEncoding = self.parameterAsString(parameters, self.SHAPE_ENCODING, context)
ssrs = self.parameterAsCrs(parameters, self.S_SRS, context)
tsrs = self.parameterAsCrs(parameters, self.T_SRS, context)
asrs = self.parameterAsCrs(parameters, self.A_SRS, context)
ssrs = self.parameterAsCrs(parameters, self.S_SRS, context).authid()
tsrs = self.parameterAsCrs(parameters, self.T_SRS, context).authid()
asrs = self.parameterAsCrs(parameters, self.A_SRS, context).authid()
table = self.parameterAsString(parameters, self.TABLE, context)
schema = self.parameterAsString(parameters, self.SCHEMA, context)
pk = self.parameterAsString(parameters, self.PK, context)
@@ -271,13 +271,12 @@ def getConsoleCommands(self, parameters, context, feedback):
if len(asrs) > 0:
arguments.append('-a_srs')
arguments.append(asrs)
if len(spat) > 0:
regionCoords = spat.split(',')
if not spat.isNull():
arguments.append('-spat')
arguments.append(regionCoords[0])
arguments.append(regionCoords[2])
arguments.append(regionCoords[1])
arguments.append(regionCoords[3])
arguments.append(spat.xMinimum())
arguments.append(spat.yMinimum())
arguments.append(spat.xMaximum())
arguments.append(spat.yMaximum())
if clip:
arguments.append('-clipsrc spat_extent')
if skipfailures:

0 comments on commit 3d3d297

Please sign in to comment.
You can’t perform that action at this time.