def processAlgorithm(self, progress): '''Here is where the processing itself takes place''' ili = self.getParameterValue(self.ILI) imd = self.getParameterValue(self.IMD) IliUtils.runIli2c(["-oIMD", "--out", imd, ili], progress)
def processAlgorithm(self, progress): '''Here is where the processing itself takes place''' db = self.getParameterValue(self.DBNAME) connoptions = { "host": self.getParameterValue(self.HOST), "port": self.getParameterValue(self.PORT), "username": self.getParameterValue(self.USER), "password": self.getParameterValue(self.PASSWORD), "template": self.getParameterValue(self.TEMPLATE) } connargs = ['--no-password'] for k, v in connoptions.items(): if len(v) > 0 and k <> 'password': connargs.append("--%s=%s" % (k, v)) #output = self.getOutputValue(self.OUTPUT) IliUtils.runShellCmd([ SextanteConfig.getSetting(IliUtils.CREATEDB_EXEC), ' '.join(connargs), db ], progress) DbConnection.add_connection(db, connoptions["host"], connoptions["port"], db, connoptions["username"], connoptions["password"])
def processAlgorithm(self, progress): '''Here is where the processing itself takes place''' ili = self.getParameterValue(self.ILI) db = self.getParameterFromName(self.DB) ili2pgargs = ['-schemaimport'] ili2pgargs.extend(connectionOptions(db)) ili2pgargs.extend(["-models", ili]) IliUtils.runJava( SextanteConfig.getSetting(IliUtils.ILI2PG_JAR), ili2pgargs, progress )
def processAlgorithm(self, progress): '''Here is where the processing itself takes place''' ili = self.getParameterValue(self.ILI) db = self.getParameterFromName(self.DB) ili2pgargs = ['-schemaimport'] ili2pgargs.extend(connectionOptions(db)) ili2pgargs.extend(["-models", ili]) IliUtils.runJava( SextanteConfig.getSetting(IliUtils.ILI2PG_JAR), ili2pgargs, progress)
def processAlgorithm(self, progress): '''Here is where the processing itself takes place''' ili = self.getParameterValue(self.ILI) imd = SextanteUtils.getTempFilename('imd') gml = SextanteUtils.getTempFilename('gml') db = self.getParameterFromName(self.DB) #output = self.getOutputValue(self.OUTPUT) IliUtils.runIli2c(["-oIMD", "--out", imd, ili], progress) gmlstr = extract_enums_asgml(imd) f = open(gml, "w") f.write(gmlstr) f.close() #IliUtils.runShellCmd(["ogr2ogr", "-f", "PostgreSQL", db.getOgrConnection(), gml], progress) ogr2ogr(pszFormat=db.getOgrDriverName(), pszDataSource=gml, pszDestDataSource=db.getOgrConnection(), errfunc=IliUtils.errfunc)
def processAlgorithm(self, progress): '''Here is where the processing itself takes place''' db = self.getParameterValue(self.DBNAME) connoptions = { "host": self.getParameterValue(self.HOST), "port": self.getParameterValue(self.PORT), "username": self.getParameterValue(self.USER), "password": self.getParameterValue(self.PASSWORD), "template": self.getParameterValue(self.TEMPLATE) } connargs = ['--no-password'] for k, v in connoptions.items(): if len(v) > 0 and k <> 'password': connargs.append("--%s=%s" % (k, v)) #output = self.getOutputValue(self.OUTPUT) IliUtils.runShellCmd([SextanteConfig.getSetting(IliUtils.CREATEDB_EXEC), ' '.join(connargs), db], progress) DbConnection.add_connection(db, connoptions["host"], connoptions[ "port"], db, connoptions["username"], connoptions["password"])