@@ -161,7 +161,6 @@ def getConsoleCommands(self):
161161 dbname = unicode (self .getParameterValue (self .DBNAME ))
162162 password = unicode (self .getParameterValue (self .PASSWORD ))
163163 schema = unicode (self .getParameterValue (self .SCHEMA ))
164- schemastring = "-lco SCHEMA=" + schema
165164 table = unicode (self .getParameterValue (self .TABLE ))
166165 pk = unicode (self .getParameterValue (self .PK ))
167166 pkstring = "-lco FID=" + pk
@@ -173,7 +172,6 @@ def getConsoleCommands(self):
173172 simplify = unicode (self .getParameterValue (self .SIMPLIFY ))
174173 segmentize = unicode (self .getParameterValue (self .SEGMENTIZE ))
175174 spat = self .getParameterValue (self .SPAT )
176- ogrspat = self .ogrConnectionString (spat )
177175 clip = self .getParameterValue (self .CLIP )
178176 where = unicode (self .getParameterValue (self .WHERE ))
179177 wherestring = '-where "' + where + '"'
@@ -201,6 +199,10 @@ def getConsoleCommands(self):
201199 arguments .append ('dbname=' + dbname )
202200 if len (password ) > 0 :
203201 arguments .append ('password=' + password )
202+ if len (schema ) > 0 :
203+ arguments .append ('active_schema=' + schema )
204+ else :
205+ arguments .append ('active_schema=public' )
204206 arguments .append ('user=' + user + '"' )
205207 arguments .append (dimstring )
206208 arguments .append (ogrLayer )
@@ -218,8 +220,6 @@ def getConsoleCommands(self):
218220 if len (self .GEOMTYPE [self .getParameterValue (self .GTYPE )]) > 0 :
219221 arguments .append ('-nlt' )
220222 arguments .append (self .GEOMTYPE [self .getParameterValue (self .GTYPE )])
221- if len (schema ) > 0 :
222- arguments .append (schemastring )
223223 if len (geocolumn ) > 0 :
224224 arguments .append (geocolumnstring )
225225 if len (pk ) > 0 :
@@ -239,7 +239,7 @@ def getConsoleCommands(self):
239239 arguments .append ('-a_srs' )
240240 arguments .append (asrs )
241241 if len (spat ) > 0 :
242- regionCoords = ogrspat .split (',' )
242+ regionCoords = spat .split (',' )
243243 arguments .append ('-spat' )
244244 arguments .append (regionCoords [0 ])
245245 arguments .append (regionCoords [2 ])
0 commit comments