Beispiel #1
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_merge.py")

        self.inSelector.setType(self.inSelector.FILE)
        self.outSelector.setType(self.outSelector.FILE)
        self.recurseCheck.hide()
        # use this for approx. previous UI
        #self.creationOptionsWidget.setType(QgsRasterFormatSaveOptionsWidget.Table)

        self.outputFormat = Utils.fillRasterOutputFormat()
        self.extent = None

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
            (self.inputDirCheck, SIGNAL("stateChanged(int)")),
            (self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck),
            (self.separateCheck, SIGNAL("stateChanged( int )")),
            (self.pctCheck, SIGNAL("stateChanged( int )")),
            (self.intersectCheck, SIGNAL("stateChanged( int )")),
            (self.creationOptionsWidget, SIGNAL("optionsChanged()")),
            (self.creationOptionsGroupBox, SIGNAL("toggled(bool)"))
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
        self.connect(self.intersectCheck, SIGNAL("toggled(bool)"), self.refreshExtent)
        self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"), self.switchToolMode)
        self.connect(self.inSelector, SIGNAL("filenameChanged()"), self.refreshExtent)
Beispiel #2
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.canvas = self.iface.mapCanvas()

      self.clipper = ClipperSelector(self.canvas)

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_merge.py", None, self.iface.mainWindow())

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.inputFiles = QStringList()
      self.warningDialog = QErrorMessage(self)

      self.setParamsStatus(
        [
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")), 
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
          (self.pctCheck, SIGNAL("stateChanged(int)"))
        ]
      )

      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect(self.clipper, SIGNAL("clippingRectangleCreated()"), self.fillCoords)
      self.connect(self.x1CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
      self.connect(self.x2CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
      self.connect(self.y1CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
      self.connect(self.y2CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
      self.connect(self.clipper, SIGNAL("deactivated()"), self.pauseClipping)
      self.connect(self.btnEnableClip, SIGNAL("clicked()"), self.startClipping)
Beispiel #3
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_merge.py")

      self.inSelector.setType( self.inSelector.FILE )
      self.outSelector.setType( self.outSelector.FILE )
      self.recurseCheck.hide()
      # use this for approx. previous UI
      #self.creationOptionsTable.setType(QgsRasterFormatSaveOptionsWidget.Table)

      self.outputFormat = Utils.fillRasterOutputFormat()
      self.extent = None

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
          (self.inputDirCheck, SIGNAL("stateChanged(int)")),
          (self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck),
          ( self.separateCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.pctCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.intersectCheck, SIGNAL( "stateChanged( int )" ) )
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.intersectCheck, SIGNAL("toggled(bool)"), self.refreshExtent)
      self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"), self.switchToolMode)
      self.connect(self.inSelector, SIGNAL("filenameChanged()"), self.refreshExtent)
Beispiel #4
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resolutions = ("highest", "average", "lowest")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")

      self.inSelector.setType( self.inSelector.FILE )
      self.outSelector.setType( self.outSelector.FILE )
      self.recurseCheck.hide()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")), 
          (self.outSelector, SIGNAL("filenameChanged()")), 
          (self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
          (self.srcNoDataSpin, SIGNAL("valueChanged(int)"), self.srcNoDataCheck, "1.7.0"),
          (self.inputDirCheck, SIGNAL("stateChanged(int)")),
          (self.separateCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
          (self.allowProjDiffCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
          (self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck)
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect( self.inputDirCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
Beispiel #5
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.canvas = self.iface.mapCanvas()

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_merge.py", None, self.iface.mainWindow())

      self.extentSelector.setCanvas(self.canvas)
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.inputFiles = QStringList()
      self.warningDialog = QErrorMessage(self)

      self.setParamsStatus(
        [
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")), 
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
          (self.pctCheck, SIGNAL("stateChanged(int)")), 
          ( self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")] )
        ]
      )

      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.checkRun)
      self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)
Beispiel #6
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdalinfo")

        # we don't need load to canvas functionality
        self.base.loadCheckBox.hide()
        # make window large
        self.base.resize(400, 360)

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.suppressGCPCheck, SIGNAL("stateChanged( int )")),
            (self.suppressMDCheck, SIGNAL("stateChanged( int )"))
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFileEdit)

        # helper actions for copying info output
        self.copyLine = QAction(self.tr("Copy"), self)
        QObject.connect(self.copyLine, SIGNAL("triggered()"), self.doCopyLine)
        self.copyAll = QAction(self.tr("Copy all"), self)
        QObject.connect(self.copyAll, SIGNAL("triggered()"), self.doCopyAll)
Beispiel #7
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_contour")

      gdalVersion = Utils.GdalConfig.version()
      self.useDirAsOutput = gdalVersion < "1.7.0"

      self.outSelector.setType( self.outSelector.FILE )

      # set the default QSpinBoxes value
      self.intervalDSpinBox.setValue(10.0)

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()") ),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.intervalDSpinBox, SIGNAL("valueChanged(double)")),
          (self.attributeEdit, SIGNAL("textChanged(const QString &)"), self.attributeCheck)
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #8
0
  def __init__( self, iface ):
      QWidget.__init__( self )
      self.iface = iface

      self.setupUi( self )
      BasePluginWidget.__init__( self, self.iface, "gdalinfo" )

      # we don't need load to canvas functionality
      self.base.loadCheckBox.hide()
      # make window large
      self.base.resize( 400, 360 )

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          ( self.suppressGCPCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.suppressMDCheck, SIGNAL( "stateChanged( int )" ) )
        ]
      )

      self.connect( self.selectInputFileButton, SIGNAL( "clicked()" ), self.fillInputFileEdit )

      # helper actions for copying info output
      self.copyLine = QAction( self.tr( "Copy" ), self )
      QObject.connect( self.copyLine, SIGNAL( "triggered()" ), self.doCopyLine )
      self.copyAll = QAction( self.tr( "Copy all" ), self )
      QObject.connect( self.copyAll, SIGNAL( "triggered()" ), self.doCopyAll )

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #9
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_contour")

        gdalVersion = Utils.GdalConfig.version()
        self.useDirAsOutput = gdalVersion < "1.7.0"
        if self.useDirAsOutput:
            self.label_2.setText(
                QApplication.translate("GdalToolsWidget", "&Output directory for contour lines (shapefile)")
            )

        self.outSelector.setType(self.outSelector.FILE)

        # set the default QSpinBoxes value
        self.intervalDSpinBox.setValue(10.0)

        self.setParamsStatus(
            [
                (self.inSelector, SIGNAL("filenameChanged()")),
                (self.outSelector, SIGNAL("filenameChanged()")),
                (self.intervalDSpinBox, SIGNAL("valueChanged(double)")),
                (self.attributeEdit, SIGNAL("textChanged(const QString &)"), self.attributeCheck),
            ]
        )

        self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #10
0
  def __init__( self, iface ):
      QWidget.__init__( self )
      self.iface = iface

      self.setupUi( self )
      BasePluginWidget.__init__( self, self.iface, "gdalinfo" )

      # we don't need load to canvas functionality
      self.base.loadCheckBox.hide()
      # make window large
      self.base.resize( 400, 360 )

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()") ),
          ( self.suppressGCPCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.suppressMDCheck, SIGNAL( "stateChanged( int )" ) )
        ]
      )

      self.connect( self.inSelector, SIGNAL( "selectClicked()" ), self.fillInputFileEdit )

      # helper actions for copying info output
      self.copyLine = QAction( self.tr( "Copy" ), self )
      QObject.connect( self.copyLine, SIGNAL( "triggered()" ), self.doCopyLine )
      self.copyAll = QAction( self.tr( "Copy all" ), self )
      QObject.connect( self.copyAll, SIGNAL( "triggered()" ), self.doCopyAll )
Beispiel #11
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.resolutions = ("highest", "average", "lowest")

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")

        self.inSelector.setType(self.inSelector.FILE)
        self.outSelector.setType(self.outSelector.FILE)
        self.recurseCheck.hide()

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"),
             self.resolutionCheck),
            (self.srcNoDataSpin, SIGNAL("valueChanged(int)"),
             self.srcNoDataCheck, "1.7.0"),
            (self.inputDirCheck, SIGNAL("stateChanged(int)")),
            (self.separateCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
            (self.allowProjDiffCheck, SIGNAL("stateChanged(int)"), None,
             "1.7.0"),
            (self.recurseCheck, SIGNAL("stateChanged(int)"),
             self.inputDirCheck)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFilesEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
        self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"),
                     self.switchToolMode)
Beispiel #12
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_contour")

        gdalVersion = Utils.GdalConfig.versionNum()
        self.useDirAsOutput = gdalVersion < 1700
        if self.useDirAsOutput:
            self.label_2.setText(
                QApplication.translate(
                    "GdalToolsWidget",
                    "&Output directory for contour lines (shapefile)"))

        self.outSelector.setType(self.outSelector.FILE)

        # set the default QSpinBoxes value
        self.intervalDSpinBox.setValue(10.0)

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.intervalDSpinBox, SIGNAL("valueChanged(double)")),
            (self.attributeEdit, SIGNAL("textChanged(const QString &)"),
             self.attributeCheck)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
Beispiel #13
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_proximity.py")

        self.outSelector.setType(self.outSelector.FILE)
        self.outputFormat = Utils.fillRasterOutputFormat()

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.valuesEdit, SIGNAL("textChanged(const QString &)"),
             self.valuesCheck),
            (self.distUnitsCombo, SIGNAL("currentIndexChanged(int)"),
             self.distUnitsCheck),
            (self.maxDistSpin, SIGNAL("valueChanged(int)"), self.maxDistCheck),
            (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
            (self.fixedBufValSpin, SIGNAL("valueChanged(int)"),
             self.fixedBufValCheck)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
Beispiel #14
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_proximity.py")

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.valuesEdit, SIGNAL("textChanged(const QString &)"), self.valuesCheck),
          (self.distUnitsCombo, SIGNAL("currentIndexChanged(int)"), self.distUnitsCheck),
          (self.maxDistSpin, SIGNAL("valueChanged(int)"), self.maxDistCheck),
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
          (self.fixedBufValSpin, SIGNAL("valueChanged(int)"), self.fixedBufValCheck)
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #15
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.resolutions = ("highest", "average", "lowest")

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")

        self.inSelector.setType(self.inSelector.FILE)
        self.outSelector.setType(self.outSelector.FILE)
        self.recurseCheck.hide()
        self.visibleRasterLayers = []

        self.setParamsStatus(
            [
                (self.inSelector, SIGNAL("filenameChanged()")),
                (self.outSelector, SIGNAL("filenameChanged()")),
                (self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
                (self.noDataEdit, SIGNAL("textChanged( const QString & )"), self.srcNoDataCheck, 1700),
                (self.inputDirCheck, SIGNAL("stateChanged(int)")),
                (self.separateCheck, SIGNAL("stateChanged(int)"), None, 1700),
                (self.targetSRSEdit, SIGNAL("textChanged(const QString &)"), self.targetSRSCheck),
                (self.allowProjDiffCheck, SIGNAL("stateChanged(int)"), None, 1700),
                (self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck),
                (self.inputSelLayersCheck, SIGNAL("stateChanged(int)"))
            ]
        )

        self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
        self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"), self.switchToolMode)
        self.connect(self.inputSelLayersCheck, SIGNAL("stateChanged( int )"), self.switchLayerMode)
        self.connect(self.iface.mapCanvas(), SIGNAL("stateChanged( int )"), self.switchLayerMode)
        self.connect(self.selectTargetSRSButton, SIGNAL("clicked()"), self.fillTargetSRSEdit)
Beispiel #16
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resolutions = ("highest", "average", "lowest")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")

      self.recurseCheck.hide()

      self.setParamsStatus(
        [
          (self.inputFilesEdit, SIGNAL("textChanged(const QString &)")), 
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")), 
          (self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
          (self.srcNoDataSpin, SIGNAL("valueChanged(int)"), self.srcNoDataCheck, "1.7.0"),
          (self.separateCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
          (self.inputDirCheck, SIGNAL("stateChanged(int)")),
          (self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck)
        ]
      )

      self.connect(self.selectInputFilesButton, SIGNAL("clicked()"), self.fillInputFilesEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect( self.inputDirCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
Beispiel #17
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.canvas = self.iface.mapCanvas()

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_translate")

      self.outSelector.setType( self.outSelector.FILE )
      self.extentSelector.setCanvas(self.canvas)
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()") ),
          (self.outSelector, SIGNAL("filenameChanged()") ),
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck, "1.7.0"),
          (self.maskSelector, SIGNAL("filenameChanged()"), self.maskModeRadio, "1.6.0"),
          (self.alphaBandCheck, SIGNAL( "stateChanged( int )") ),
          (self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentModeRadio),
          (self.modeStackedWidget, SIGNAL("currentIndexChanged(int)"))
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.maskSelector, SIGNAL("selectClicked()"), self.fillMaskFileEdit)
      self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.extentChanged)
      self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)

      self.connect(self.extentModeRadio, SIGNAL("toggled(bool)"), self.switchClippingMode)
Beispiel #18
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.canvas = self.iface.mapCanvas()

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_translate")

      self.outSelector.setType( self.outSelector.FILE )
      self.extentSelector.setCanvas(self.canvas)
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus([
          (self.inSelector, SIGNAL("filenameChanged()") ),
          (self.outSelector, SIGNAL("filenameChanged()") ),
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck, 1700),
          (self.maskSelector, SIGNAL("filenameChanged()"), self.maskModeRadio, 1600),
          (self.alphaBandCheck, SIGNAL( "stateChanged( int )") ),
          (self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentModeRadio),
          (self.modeStackedWidget, SIGNAL("currentIndexChanged(int)"))
      ])

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.maskSelector, SIGNAL("selectClicked()"), self.fillMaskFileEdit)
      self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.extentChanged)
      self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)

      self.connect(self.extentModeRadio, SIGNAL("toggled(bool)"), self.switchClippingMode)
Beispiel #19
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.resolutions = ("highest", "average", "lowest")

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_polygonize.py")

        self.outSelector.setType(self.outSelector.FILE)
        self.outputFormat = Utils.fillVectorOutputFormat()

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.maskSelector, SIGNAL("filenameChanged()"), self.maskCheck),
            (self.fieldEdit, SIGNAL("textChanged(const QString &)"),
             self.fieldCheck)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
        self.connect(self.maskSelector, SIGNAL("selectClicked()"),
                     self.fillMaskFileEdit)
Beispiel #20
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_merge.py")

      self.inSelector.setType( self.inSelector.FILE )
      self.outSelector.setType( self.outSelector.FILE )
      self.recurseCheck.hide()

      self.outputFormat = Utils.fillRasterOutputFormat()
      self.extent = None

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")), 
          (self.outSelector, SIGNAL("filenameChanged()")), 
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
          (self.inputDirCheck, SIGNAL("stateChanged(int)")),
          (self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck),
          ( self.separateCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.pctCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.intersectCheck, SIGNAL( "stateChanged( int )" ) ),
          (self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox)
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.intersectCheck, SIGNAL("toggled(bool)"), self.refreshExtent)
      self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"), self.switchToolMode)
      self.connect(self.inSelector, SIGNAL("filenameChanged()"), self.refreshExtent)
Beispiel #21
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_merge.py")

      self.inSelector.setType( self.inSelector.FILE )
      self.outSelector.setType( self.outSelector.FILE )

      self.outputFormat = Utils.fillRasterOutputFormat()
      self.extent = None

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")), 
          (self.outSelector, SIGNAL("filenameChanged()")), 
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
	      ( self.separateCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.pctCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.intersectCheck, SIGNAL( "stateChanged( int )" ) ),
          (self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox)
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.intersectCheck, SIGNAL("stateChanged(int)"), self.refreshExtent)
Beispiel #22
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_rasterize")

      self.outSelector.setType( self.outSelector.FILE )

      # set the default QSpinBoxes and QProgressBar value
      self.widthSpin.setValue(3000)
      self.heightSpin.setValue(3000)

      self.lastEncoding = Utils.getLastUsedEncoding()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.attributeComboBox, SIGNAL("currentIndexChanged(int)")),
          ( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" ), self.resizeGroupBox, "1.8.0" ),
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillFieldsCombo)
Beispiel #23
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdaltindex")

        self.inSelector.setType(self.inSelector.FILE)
        self.outSelector.setType(self.outSelector.FILE)

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            #( self.recurseCheck, SIGNAL( "stateChanged( int )" ),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.indexFieldEdit, SIGNAL("textChanged( const QString & )"),
             self.indexFieldCheck),
            (self.absolutePathCheck, SIGNAL("stateChanged( int )"), None,
             "1.5.0"),
            (self.skipDifferentProjCheck, SIGNAL("stateChanged( int )"), None,
             "1.5.0")
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputDirEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
Beispiel #24
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_rasterize")

      self.outSelector.setType( self.outSelector.FILE )

      # set the default QSpinBoxes and QProgressBar value
      self.widthSpin.setValue(3000)
      self.heightSpin.setValue(3000)
      self.horizresSpin.setValue(1)
      self.vertresSpin.setValue(1)

      self.lastEncoding = Utils.getLastUsedEncoding()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.attributeComboBox, SIGNAL("currentIndexChanged(int)")),
          ( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" )),
          ( [self.horizresSpin, self.vertresSpin], SIGNAL( "valueChanged(double)" ))
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillFieldsCombo)
      self.connect(self.radioSetSize, SIGNAL("toggled(bool)"), self.someValueChanged)
      self.connect(self.radioSetResolution, SIGNAL("toggled(bool)"), self.someValueChanged)
Beispiel #25
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.modes = ("hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "roughness")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdaldem")

      self.outSelector.setType( self.outSelector.FILE )
      self.configSelector.setType( self.configSelector.FILE )

      # set the default QSpinBoxes and QProgressBar value
      self.bandSpin.setValue(1)

      self.hillshadeZFactorSpin.setValue(1)
      self.hillshadeScaleSpin.setValue(1)
      self.hillshadeAltitudeSpin.setValue(45.0)
      self.hillshadeAzimuthSpin.setValue(315.0)
      self.slopeScaleSpin.setValue(1)

      # set the default color configuration file to terrain
      import os.path
      colorConfigFile = os.path.join(os.path.dirname(__file__), "terrain.txt")
      self.configSelector.setFilename(colorConfigFile)

      self.outputFormat = Utils.fillRasterOutputFormat()
      self.creationOptionsWidget.setFormat(self.outputFormat)

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.computeEdgesCheck, SIGNAL("stateChanged(int)"), None, 1800),
          (self.bandSpin, SIGNAL("valueChanged(int)"), self.bandCheck),
          (self.algorithmCheck, SIGNAL("stateChanged(int)"), None, 1800),
          (self.creationOptionsWidget, SIGNAL("optionsChanged()")),
          (self.creationOptionsGroupBox, SIGNAL("toggled(bool)")),
          (self.modeCombo, SIGNAL("currentIndexChanged(int)")),
          ([self.hillshadeZFactorSpin, self.hillshadeScaleSpin, self.hillshadeAltitudeSpin, self.hillshadeAzimuthSpin], SIGNAL("valueChanged(double)")),
          (self.slopeScaleSpin, SIGNAL("valueChanged(double)")),
          (self.slopePercentCheck, SIGNAL("stateChanged(int)")),
          ([self.aspectTrigonometricCheck, self.aspectZeroForFlatCheck], SIGNAL("stateChanged(int)")),
          (self.configSelector, SIGNAL("filenameChanged()")),
          ([self.colorExactRadio, self.colorNearestRadio], SIGNAL("toggled(bool)"), self.colorMatchGroupBox),
          (self.colorAlphaCheck, SIGNAL("stateChanged(int)"))
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.configSelector, SIGNAL("selectClicked()"), self.fillColorConfigFileEdit)
      self.connect(self.modeCombo, SIGNAL("currentIndexChanged(int)"), self.showModeParams)
Beispiel #26
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.modes = ("hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "roughness")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdaldem")

      self.outSelector.setType( self.outSelector.FILE )
      self.configSelector.setType( self.configSelector.FILE )

      # set the default QSpinBoxes and QProgressBar value
      self.bandSpin.setValue(1)

      self.hillshadeZFactorSpin.setValue(1)
      self.hillshadeScaleSpin.setValue(1)
      self.hillshadeAltitudeSpin.setValue(45.0)
      self.hillshadeAzimuthSpin.setValue(315.0)
      self.slopeScaleSpin.setValue(1)

      # set the default color configuration file to terrain
      import os.path
      colorConfigFile = os.path.join(os.path.dirname(__file__), "terrain.txt")
      self.configSelector.setFilename(colorConfigFile)

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")), 
          (self.outSelector, SIGNAL("filenameChanged()")), 
          (self.computeEdgesCheck, SIGNAL("stateChanged(int)"), None, "1.8.0"), 
          (self.bandSpin, SIGNAL("valueChanged(int)"), self.bandCheck), 
          (self.algorithmCheck, SIGNAL("stateChanged(int)"), None, "1.8.0"), 
          (self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox), 
          (self.modeCombo, SIGNAL("currentIndexChanged(int)")),
          ([self.hillshadeZFactorSpin, self.hillshadeScaleSpin, self.hillshadeAltitudeSpin, self.hillshadeAzimuthSpin], SIGNAL("valueChanged(double)")), 
          (self.slopeScaleSpin, SIGNAL("valueChanged(double)")), 
          (self.slopePercentCheck, SIGNAL("stateChanged(int)")), 
          ([self.aspectTrigonometricCheck, self.aspectZeroForFlatCheck], SIGNAL("stateChanged(int)")), 
          (self.configSelector, SIGNAL("filenameChanged()")), 
          ([self.colorExactRadio, self.colorNearestRadio], SIGNAL("toggled(bool)"), self.colorMatchGroupBox), 
          (self.colorAlphaCheck, SIGNAL("stateChanged(int)"))
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.configSelector, SIGNAL("selectClicked()"), self.fillColorConfigFileEdit)
      self.connect(self.modeCombo, SIGNAL("currentIndexChanged(int)"), self.showModeParams)
Beispiel #27
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.canvas = self.iface.mapCanvas()
      self.algorithm = ('invdist', 'average', 'nearest', 'datametrics')
      self.datametrics = ('minimum', 'maximum', 'range')

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_grid")

      self.outSelector.setType( self.outSelector.FILE )
      self.extentSelector.setCanvas(self.canvas)
      #self.extentSelector.stop()

      # set the default QSpinBoxes and QProgressBar value
      self.widthSpin.setValue(3000)
      self.heightSpin.setValue(3000)
      self.invdistPowerSpin.setValue(2.0)

      self.outputFormat = Utils.fillRasterOutputFormat()
      self.lastEncoding = Utils.getLastUsedEncoding()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.zfieldCombo, SIGNAL("currentIndexChanged(int)"), self.zfieldCheck),
          (self.algorithmCombo, SIGNAL("currentIndexChanged(int)"), self.algorithmCheck),
          (self.stackedWidget, None, self.algorithmCheck),
          ([self.invdistPowerSpin, self.invdistSmothingSpin, self.invdistRadius1Spin, self.invdistRadius2Spin, self.invdistAngleSpin, self.invdistNoDataSpin], SIGNAL("valueChanged(double)")),
          ([self.invdistMaxPointsSpin, self.invdistMinPointsSpin], SIGNAL("valueChanged(int)")),
          ([self.averageRadius1Spin, self.averageRadius2Spin, self.averageAngleSpin, self.averageNoDataSpin], SIGNAL("valueChanged(double)")),
          (self.averageMinPointsSpin, SIGNAL("valueChanged(int)")),
          ([self.nearestRadius1Spin, self.nearestRadius2Spin, self.nearestAngleSpin, self.nearestNoDataSpin], SIGNAL("valueChanged(double)")),
          (self.datametricsCombo, SIGNAL("currentIndexChanged(int)")),
          ([self.datametricsRadius1Spin, self.datametricsRadius2Spin, self.datametricsAngleSpin, self.datametricsNoDataSpin], SIGNAL("valueChanged(double)")),
          (self.datametricsMinPointsSpin, SIGNAL("valueChanged(int)")),
          (self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup),
          ( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" ), self.resizeGroupBox )
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillFieldsCombo)
      self.connect(self.extentGroup, SIGNAL("toggled(bool)"), self.onExtentCheckedChanged)
Beispiel #28
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_sieve.py")

      self.outSelector.setType( self.outSelector.FILE )
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus([
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.thresholdSpin, SIGNAL("valueChanged(int)"), self.thresholdCheck),
          (self.connectionsCombo, SIGNAL("currentIndexChanged(int)"), self.connectionsCheck)
      ])

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #29
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_sieve.py")

        self.outSelector.setType(self.outSelector.FILE)
        self.outputFormat = Utils.fillRasterOutputFormat()

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.thresholdSpin, SIGNAL("valueChanged(int)"), self.thresholdCheck),
            (self.connectionsCombo, SIGNAL("currentIndexChanged(int)"), self.connectionsCheck)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #30
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.resolutions = ("highest", "average", "lowest")

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")

        self.inSelector.setType(self.inSelector.FILE)
        self.outSelector.setType(self.outSelector.FILE)
        self.recurseCheck.hide()
        self.visibleRasterLayers = []

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"),
             self.resolutionCheck),
            (self.noDataEdit, SIGNAL("textChanged( const QString & )"),
             self.srcNoDataCheck, 1700),
            (self.inputDirCheck, SIGNAL("stateChanged(int)")),
            (self.separateCheck, SIGNAL("stateChanged(int)"), None, 1700),
            (self.targetSRSEdit, SIGNAL("textChanged(const QString &)"),
             self.targetSRSCheck),
            (self.allowProjDiffCheck, SIGNAL("stateChanged(int)"), None, 1700),
            (self.recurseCheck, SIGNAL("stateChanged(int)"),
             self.inputDirCheck),
            (self.inputSelLayersCheck, SIGNAL("stateChanged(int)"))
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFilesEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
        self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"),
                     self.switchToolMode)
        self.connect(self.inputSelLayersCheck, SIGNAL("stateChanged( int )"),
                     self.switchLayerMode)
        self.connect(self.iface.mapCanvas(), SIGNAL("stateChanged( int )"),
                     self.switchLayerMode)
        self.connect(self.selectTargetSRSButton, SIGNAL("clicked()"),
                     self.fillTargetSRSEdit)
Beispiel #31
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdaltindex")

        self.inSelector.setType(self.inSelector.FILE)
        self.outSelector.setType(self.outSelector.FILE)

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            #( self.recurseCheck, SIGNAL( "stateChanged( int )" ),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.indexFieldEdit, SIGNAL("textChanged( const QString & )"), self.indexFieldCheck),
            (self.skipDifferentProjCheck, SIGNAL("stateChanged( int )"), None, 1500)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputDirEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #32
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "nearblack")

      self.outSelector.setType( self.outSelector.FILE )

      # set the default QSpinBoxes value
      self.nearSpin.setValue(15)

      self.setParamsStatus([
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.nearSpin, SIGNAL("valueChanged(int)"), self.nearCheck),
          (self.whiteCheckBox, SIGNAL("stateChanged(int)"))
      ])

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #33
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resolutions = ("highest", "average", "lowest")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_polygonize.py")

      self.outSelector.setType( self.outSelector.FILE )
      self.outputFormat = Utils.fillVectorOutputFormat()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.fieldEdit, SIGNAL("textChanged(const QString &)"), self.fieldCheck)
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #34
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_proximity.py")

      self.outSelector.setType( self.outSelector.FILE )
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus([
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.valuesEdit, SIGNAL("textChanged(const QString &)"), self.valuesCheck),
          (self.distUnitsCombo, SIGNAL("currentIndexChanged(int)"), self.distUnitsCheck),
          (self.maxDistSpin, SIGNAL("valueChanged(int)"), self.maxDistCheck),
          (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
          (self.fixedBufValSpin, SIGNAL("valueChanged(int)"), self.fixedBufValCheck)
      ])

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Beispiel #35
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.algorithm = ('invdist', 'average', 'nearest', 'datametrics')
      self.datametrics = ('minimum', 'maximum', 'range')

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_grid")

      # set the default QSpinBoxes value
      self.invdistPowerSpin.setValue(2.0)

      self.outputFormat = Utils.fillRasterOutputFormat()
      self.lastEncoding = Utils.getLastUsedEncoding()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.zfieldCombo, SIGNAL("currentIndexChanged(int)"), self.zfieldCheck),
          (self.algorithmCombo, SIGNAL("currentIndexChanged(int)"), self.algorithmCheck),
          (self.stackedWidget, SIGNAL("currentChanged(int)"), self.algorithmCheck),
          ([self.invdistPowerSpin, self.invdistSmothingSpin, self.invdistRadius1Spin, self.invdistRadius2Spin, self.invdistAngleSpin, self.invdistNoDataSpin], SIGNAL("valueChanged(double)")),
          ([self.invdistMaxPointsSpin, self.invdistMinPointsSpin], SIGNAL("valueChanged(int)")),
          ([self.averageRadius1Spin, self.averageRadius2Spin, self.averageAngleSpin, self.averageNoDataSpin], SIGNAL("valueChanged(double)")),
          (self.averageMinPointsSpin, SIGNAL("valueChanged(int)")),
          ([self.nearestRadius1Spin, self.nearestRadius2Spin, self.nearestAngleSpin, self.nearestNoDataSpin], SIGNAL("valueChanged(double)")),
          (self.datametricsCombo, SIGNAL("currentIndexChanged(int)")),
          ([self.datametricsRadius1Spin, self.datametricsRadius2Spin, self.datametricsAngleSpin, self.datametricsNoDataSpin], SIGNAL("valueChanged(double)")),
          (self.datametricsMinPointsSpin, SIGNAL("valueChanged(int)"))
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect(self.inputLayerCombo, SIGNAL("currentIndexChanged(int)"), self.fillFieldsCombo)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #36
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_sieve.py")

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.thresholdSpin, SIGNAL("valueChanged(int)"), self.thresholdCheck),
          (self.connectionsCombo, SIGNAL("currentIndexChanged(int)"), self.connectionsCheck)
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #37
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "nearblack")

        self.outSelector.setType(self.outSelector.FILE)

        # set the default QSpinBoxes value
        self.nearSpin.setValue(15)

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.nearSpin, SIGNAL("valueChanged(int)"), self.nearCheck),
            (self.whiteCheckBox, SIGNAL("stateChanged(int)"))
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
Beispiel #38
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resolutions = ("highest", "average", "lowest")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_polygonize.py")

      self.outputFormat = Utils.fillVectorOutputFormat()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.fieldEdit, SIGNAL("textChanged(const QString &)"), self.fieldCheck)
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #39
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_rasterize")

      self.lastEncoding = Utils.getLastUsedEncoding()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.attributeComboBox, SIGNAL("currentIndexChanged(int)"))
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect(self.inputLayerCombo, SIGNAL("currentIndexChanged(int)"), self.fillFieldsCombo)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #40
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "nearblack")

      # set the default QSpinBoxes value
      self.nearSpin.setValue(15)

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.nearSpin, SIGNAL("valueChanged(int)"), self.nearCheck),
          (self.whiteCheckBox, SIGNAL("stateChanged(int)"))
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #41
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_contour")

      # set the default QSpinBoxes value
      self.intervalDSpinBox.setValue(10.0)

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputDirEdit, SIGNAL("textChanged(const QString &)")),
          (self.intervalDSpinBox, SIGNAL("valueChanged(double)")),
          (self.attributeEdit, SIGNAL("textChanged(const QString &)"), self.attributeCheck)
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputDirButton, SIGNAL("clicked()"), self.fillOutputDirEdit)

      # fill layers combo
      self.fillInputLayerCombo()
Beispiel #42
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.canvas = self.iface.mapCanvas()

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_translate")

        self.outSelector.setType(self.outSelector.FILE)
        self.extentSelector.setCanvas(self.canvas)
        self.outputFormat = Utils.fillRasterOutputFormat()

        # set the default QDoubleSpinBoxes
        self.xRes.setValue(12.5)
        self.yRes.setValue(12.5)

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck, 1700),
            (self.maskSelector, SIGNAL("filenameChanged()"), self.maskModeRadio, 1600),
            (self.alphaBandCheck, SIGNAL("stateChanged(int)")),
            (self.cropToCutlineCheck, SIGNAL("stateChanged(int)")),
            ([self.xRes, self.yRes], SIGNAL("valueChanged(double)"), self.setResolutionRadio),
            (self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentModeRadio),
            (self.modeStackedWidget, SIGNAL("currentIndexChanged(int)"))
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
        self.connect(self.maskSelector, SIGNAL("selectClicked()"), self.fillMaskFileEdit)
        self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.extentChanged)
        self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)

        self.connect(self.extentModeRadio, SIGNAL("toggled(bool)"), self.switchClippingMode)
        self.connect(self.keepResolutionRadio, SIGNAL("toggled(bool)"), self.switchResolutionMode)
Beispiel #43
0
 def __init__(self, iface, commandName):
     BasePluginWidget.__init__(self, iface, commandName)
Beispiel #44
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.canvas = self.iface.mapCanvas()
        self.algorithm = ("invdist", "average", "nearest", "datametrics")
        self.datametrics = ("minimum", "maximum", "range")

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_grid")

        self.extentSelector.setCanvas(self.canvas)
        # self.extentSelector.stop()

        # set the default QSpinBoxes value
        self.invdistPowerSpin.setValue(2.0)

        self.outputFormat = Utils.fillRasterOutputFormat()
        self.lastEncoding = Utils.getLastUsedEncoding()

        self.setParamsStatus(
            [
                (
                    self.inputLayerCombo,
                    [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")],
                ),
                (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
                (self.zfieldCombo, SIGNAL("currentIndexChanged(int)"), self.zfieldCheck),
                (self.algorithmCombo, SIGNAL("currentIndexChanged(int)"), self.algorithmCheck),
                (self.stackedWidget, SIGNAL("currentChanged(int)"), self.algorithmCheck),
                (
                    [
                        self.invdistPowerSpin,
                        self.invdistSmothingSpin,
                        self.invdistRadius1Spin,
                        self.invdistRadius2Spin,
                        self.invdistAngleSpin,
                        self.invdistNoDataSpin,
                    ],
                    SIGNAL("valueChanged(double)"),
                ),
                ([self.invdistMaxPointsSpin, self.invdistMinPointsSpin], SIGNAL("valueChanged(int)")),
                (
                    [self.averageRadius1Spin, self.averageRadius2Spin, self.averageAngleSpin, self.averageNoDataSpin],
                    SIGNAL("valueChanged(double)"),
                ),
                (self.averageMinPointsSpin, SIGNAL("valueChanged(int)")),
                (
                    [self.nearestRadius1Spin, self.nearestRadius2Spin, self.nearestAngleSpin, self.nearestNoDataSpin],
                    SIGNAL("valueChanged(double)"),
                ),
                (self.datametricsCombo, SIGNAL("currentIndexChanged(int)")),
                (
                    [
                        self.datametricsRadius1Spin,
                        self.datametricsRadius2Spin,
                        self.datametricsAngleSpin,
                        self.datametricsNoDataSpin,
                    ],
                    SIGNAL("valueChanged(double)"),
                ),
                (self.datametricsMinPointsSpin, SIGNAL("valueChanged(int)")),
                (self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup),
            ]
        )

        self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
        self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
        self.connect(self.inputLayerCombo, SIGNAL("currentIndexChanged(int)"), self.fillFieldsCombo)
        self.connect(self.extentGroup, SIGNAL("toggled(bool)"), self.onExtentCheckedChenged)

        # fill layers combo
        self.fillInputLayerCombo()
Beispiel #45
0
 def __init__(self, iface, commandName, helpFileBaseName=None):
     BasePluginWidget.__init__(self, iface, commandName, helpFileBaseName)
Beispiel #46
0
 def __init__(self, iface, commandName, helpFileBaseName = None):
     BasePluginWidget.__init__(self, iface, commandName, helpFileBaseName)