Beispiel #1
0
 def __executeCommands__(self, commandsArr):
     try:
         for command in commandsArr:
             print(command)
             self.logger.debug("Running commands: %s" % command)
             runCommand(command)
         return True
     except:
         self.logger.error('Problems while running command - %s' % command)
         raise
 def __executeCommands__(self, commandsArr):
     try:
         for command in commandsArr:
             print(command)
             self.logger.debug("Running commands: %s"%command)
             runCommand(command)
         return True
     except: 
         self.logger.error('Problems while running command - %s'%command)
         raise
Beispiel #3
0
 def __runGeoreferencing__(self, clipParams, tmpDir, destPath, type=None):
     # create a shapefile which represents the boundingbox of the messtischblatt and is latery used for clipping
     shpPath = self.boundingbox.asShapefile(os.path.join(tmpDir,"shape"))
     
     # get gcps
     gcps = self.__getGCP__(clipParams, 'string')
     
     # gather commands for georeference process
     commands = []
     if type == 'fast':
         # command for adding the ground control points to the tif
         pathAddingGcps = os.path.join(tmpDir,"gcpTiff.tif")
         commands.append(addGCPToTiff(gcps,self.srid,self.messtischblatt.tmpdir_zoomify_jpg,
                                      pathAddingGcps))
         commands.append(georeferenceTiff(shpPath,self.srid,pathAddingGcps,destPath,'fast'))
     
     # run commands as subprocess
     for command in commands:
         print(command)
         self.logger.info("Running commands: %s"%command)
         runCommand(command)
     return destPath