Skip to content

Commit

Permalink
Merge pull request #1848 from gioman/fix_postgis_import
Browse files Browse the repository at this point in the history
fix Processing OGR import into PostGIS
  • Loading branch information
alexbruy committed Jan 21, 2015
2 parents 43213a3 + 8499242 commit ecb93b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/gdal/ogr2ogrtopostgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def defineCharacteristics(self):

def processAlgorithm(self, progress):
inLayer = self.getParameterValue(self.INPUT_LAYER)
ogrLayer = self.ogrConnectionString(inLayer)
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
ssrs = unicode(self.getParameterValue(self.S_SRS))
tsrs = unicode(self.getParameterValue(self.T_SRS))
host = unicode(self.getParameterValue(self.HOST))
Expand Down Expand Up @@ -195,6 +195,7 @@ def processAlgorithm(self, progress):
arguments.append('"')
arguments.append(dimstring)
arguments.append(ogrLayer)
arguments.append(self.ogrLayerName(inLayer))
if index:
arguments.append(indexstring)
if launder:
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def processAlgorithm(self, progress):
port = settings.value(mySettings + '/port')
password = settings.value(mySettings + '/password')
inLayer = self.getParameterValue(self.INPUT_LAYER)
ogrLayer = self.ogrConnectionString(inLayer)
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
ssrs = unicode(self.getParameterValue(self.S_SRS))
tsrs = unicode(self.getParameterValue(self.T_SRS))
schema = unicode(self.getParameterValue(self.SCHEMA))
Expand Down Expand Up @@ -200,6 +200,7 @@ def processAlgorithm(self, progress):
arguments.append('"')
arguments.append(dimstring)
arguments.append(ogrLayer)
arguments.append(self.ogrLayerName(inLayer))
if index:
arguments.append(indexstring)
if launder:
Expand Down

0 comments on commit ecb93b1

Please sign in to comment.