Skip to content
Permalink
Browse files

[Processing] Fix ogr2ogr postgis table overwrite

  • Loading branch information
arnaud-morvan committed May 27, 2016
1 parent 94d88e6 commit 75461aa181fde473fe0b94d8e16063183f9c409c
@@ -170,9 +170,12 @@ def getConsoleCommands(self):
arguments.append(pkstring)
elif primary_key is not None:
arguments.append("-lco FID=" + primary_key)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
if len(table) == 0:
table = ogrLayerName(inLayer).lower()
if schema:
table = '{}.{}'.format(schema, table)
arguments.append('-nln')
arguments.append(table)
if skipfailures:
arguments.append('-skipfailures')
if where:
@@ -227,9 +227,12 @@ def getConsoleCommands(self):
arguments.append(pkstring)
elif primary_key is not None:
arguments.append("-lco FID=" + primary_key)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
if len(table) == 0:
table = ogrLayerName(inLayer).lower()
if schema:
table = '{}.{}'.format(schema, table)
arguments.append('-nln')
arguments.append(table)
if len(ssrs) > 0:
arguments.append('-s_srs')
arguments.append(ssrs)
@@ -233,9 +233,12 @@ def getConsoleCommands(self):
arguments.append(pkstring)
elif primary_key is not None:
arguments.append("-lco FID=" + primary_key)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
if len(table) == 0:
table = ogrLayerName(inLayer).lower()
if schema:
table = '{}.{}'.format(schema, table)
arguments.append('-nln')
arguments.append(table)
if len(ssrs) > 0:
arguments.append('-s_srs')
arguments.append(ssrs)

0 comments on commit 75461aa

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