Exemple #1
0
    def processAlgorithm(self, progress):
        '''Here is where the processing itself takes place'''

        gml = self.getParameterValue(self.GML)
        db = self.getParameterFromName(self.DB)

        #output = self.getOutputValue(self.OUTPUT)

        #IliUtils.runShellCmd(["ogr2ogr", "-f", "PostgreSQL", db.getOgrConnection(), gml], progress)

        ogr2ogr(pszFormat=db.getOgrDriverName(),
                pszDataSource=gml,
                pszDestDataSource=db.getOgrConnection(),
                errfunc=IliUtils.errfunc)
Exemple #2
0
    def processAlgorithm(self, progress):
        '''Here is where the processing itself takes place'''

        gml = self.getParameterValue(self.GML)
        db = self.getParameterFromName(self.DB)

        #output = self.getOutputValue(self.OUTPUT)

        #IliUtils.runShellCmd(["ogr2ogr", "-f", "PostgreSQL", db.getOgrConnection(), gml], progress)

        ogr2ogr(pszFormat=db.getOgrDriverName(),
                pszDataSource=gml,
                pszDestDataSource=db.getOgrConnection(),
                errfunc=IliUtils.errfunc)
Exemple #3
0
    def processAlgorithm(self, progress):
        '''Here is where the processing itself takes place'''

        ili = self.getParameterValue(self.ILI)
        xtf = self.getParameterValue(self.ITF)
        ogrinput = "%s,%s" % (xtf, ili)
        db = self.getParameterFromName(self.DB)
        append = self.getParameterValue(self.APPEND)

        srs = osr.SpatialReference()
        srs.ImportFromEPSG(21781)

        ogr2ogr(pszFormat=db.getOgrDriverName(),
                pszDataSource=ogrinput,
                pszDestDataSource=db.getOgrConnection(),
                bAppend=append,
                bOverwrite=not append,
                poOutputSRS=srs,
                poSourceSRS=srs,
                errfunc=IliUtils.errfunc)
Exemple #4
0
    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)
Exemple #5
0
    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)