Пример #1
0
  def __selectSimulationOutput(self):
    senderName = self.sender().objectName()

    fileName = utils.saveRasterDialog(self,
                                      self.settings,
                                      self.tr("Save file"),
                                      self.tr("GeoTIFF (*.tif *.tiff *.TIF *.TIFF)")
                                     )
    if fileName.isEmpty():
      return

    if senderName == "btnSelectRiskFunction":
      self.leRiskFunctionPath.setText(fileName)
    elif senderName == "btnSelectRiskValidation":
      self.leRiskValidationPath.setText(fileName)
    elif senderName == "btnSelectMonteCarlo":
      self.leMonteCarloPath.setText(fileName)
Пример #2
0
  def createChangeMap(self):
    fileName = utils.saveRasterDialog(self,
                                      self.settings,
                                      self.tr("Save change map"),
                                      self.tr("GeoTIFF (*.tif *.tiff *.TIF *.TIFF)")
                                     )

    if fileName.isEmpty():
      return

    self.inputs["changeMapName"] = unicode(fileName)

    if ("initial" in self.inputs) and ("final" in self.inputs):
      self.analyst = AreaAnalyst(self.inputs["initial"], self.inputs["final"])
      self.analyst.moveToThread(self.workThread)
      self.workThread.started.connect(self.analyst.getChangeMap)
      self.analyst.rangeChanged.connect(self.__setProgressRange)
      self.analyst.updateProgress.connect(self.__showProgress)
      self.analyst.processFinished.connect(self.changeMapDone)
      self.analyst.processFinished.connect(self.workThread.quit)
      self.workThread.start()