• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python widgetBatchBase.GdalToolsBaseBatchWidget类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中widgetBatchBase.GdalToolsBaseBatchWidget的典型用法代码示例。如果您正苦于以下问题:Python GdalToolsBaseBatchWidget类的具体用法?Python GdalToolsBaseBatchWidget怎么用?Python GdalToolsBaseBatchWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了GdalToolsBaseBatchWidget类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

  def __init__( self, iface ):
      QWidget.__init__( self )
      self.iface = iface

      self.setupUi( self )
      BaseBatchWidget.__init__( self, self.iface, "gdalwarp" )

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

      # set the default QSpinBoxes and QProgressBar value
      self.progressBar.setValue(0)

      self.progressBar.hide()
      self.recurseCheck.hide()

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

      self.connect( self.inSelector, SIGNAL( "selectClicked()" ), self.fillInputFileEdit )
      self.connect( self.selectDesiredSRSButton, SIGNAL( "clicked()" ), self.fillDesiredSRSEdit )
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
      self.connect( self.recurseCheck, SIGNAL( "stateChanged( int )" ), self.enableRecurse )
开发者ID:innotechsoftware,项目名称:Quantum-GIS,代码行数:26,代码来源:doProjection.py


示例2: __init__

  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BaseBatchWidget.__init__(self, self.iface, "rgb2pct.py")

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

      # set the default QSpinBoxes and QProgressBar value
      self.colorsSpin.setValue(2)
      self.progressBar.setValue(0)

      self.progressBar.hide()
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus([
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.colorsSpin, SIGNAL("valueChanged(int)"), self.colorsCheck),
          (self.bandSpin, SIGNAL("valueChanged(int)"), self.bandCheck, "-1")   # hide this option
      ])

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFile)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
开发者ID:Ariki,项目名称:QGIS,代码行数:26,代码来源:doRgbPct.py


示例3: __init__

  def __init__( self, iface ):
      QWidget.__init__( self )
      self.iface = iface
      self.resampling_method = ('nearest', 'average', 'gauss', 'average_mp', 'average_magphase', 'mode')

      self.setupUi( self )
      BaseBatchWidget.__init__( self, self.iface, "gdaladdo" )

      # set the default QSpinBoxes and QProgressBar value
      self.progressBar.setValue(0)

      self.progressBar.hide()
      # we don't need load to canvas functionality
      self.base.loadCheckBox.hide()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          ( self.algorithmCombo, SIGNAL( "currentIndexChanged( int )" ), self.algorithmCheck ),
          ( self.levelsEdit, SIGNAL( "textChanged( const QString & )" ) ),
          ( self.roModeCheck, SIGNAL( "stateChanged( int )" ) ),
          ( self.rrdCheck, SIGNAL( "stateChanged(int)" ) ),
          ( self.jpegQualitySpin, SIGNAL( "valueChanged (int)" ) ),
          ( self.jpegQualityContainer, None, self.tiffjpegCheck),
          ( self.jpegQualityContainer, None, None, "1.7.0"),          #only show for GDAL >=1.7.0
          ( self.cleanCheck, SIGNAL( "stateChanged(int)" ), None, "1.7.0" )         #only show for GDAL >=1.7.0
        ]
      )

      self.connect( self.selectInputFileButton, SIGNAL( "clicked()" ), self.fillInputFile )
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )

      # fill layers combo
      self.fillInputLayerCombo()
开发者ID:mmubangizi,项目名称:qgis,代码行数:34,代码来源:doOverview.py


示例4: __init__

  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BaseBatchWidget.__init__(self, self.iface, "pct2rgb.py")

      # we use one widget for two tools
      self.base.setWindowTitle( self.tr( "Convert paletted image to RGB" ) )

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

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

      self.progressBar.hide()
      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus([
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.colorsSpin, SIGNAL("valueChanged(int)"), self.colorsCheck, "-1"),   # hide this option
          (self.bandSpin, SIGNAL("valueChanged(int)"), self.bandCheck)
      ])

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFile)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
开发者ID:siliconsmiley,项目名称:QGIS,代码行数:29,代码来源:doPctRgb.py


示例5: __init__

  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BaseBatchWidget.__init__(self, self.iface, "rgb2pct.py")

      # set the default QSpinBoxes and QProgressBar value
      self.colorsSpin.setValue(2)
      self.progressBar.setValue(0)

      self.progressBar.hide()

      self.outputFormat = Utils.fillRasterOutputFormat()

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

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFile)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )

      self.fillInputLayerCombo()
开发者ID:mmubangizi,项目名称:qgis,代码行数:28,代码来源:doRgbPct.py


示例6: __init__

  def __init__( self, iface ):
      QWidget.__init__( self )
      self.iface = iface
      self.resampling_method = ('nearest', 'average', 'gauss', 'cubic', 'average_mp', 'average_magphase', 'mode')

      self.setupUi( self )
      BaseBatchWidget.__init__( self, self.iface, "gdaladdo" )

      # set the default QSpinBoxes and QProgressBar value
      self.progressBar.setValue(0)

      self.progressBar.hide()
      # we don't need load to canvas functionality
      self.base.loadCheckBox.hide()

      self.setParamsStatus(
        [
          ( self.inSelector, SIGNAL("filenameChanged()")),
          ( self.cleanCheck, SIGNAL( "stateChanged(int)" ), None, 1700 ),
          ( self.mPyramidOptionsWidget, SIGNAL( "overviewListChanged()" )),
          ( self.mPyramidOptionsWidget, SIGNAL( "someValueChanged()" ))
        ]
      )

      self.connect( self.inSelector, SIGNAL( "selectClicked()" ), self.fillInputFile )
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )

      self.init = False #workaround bug that pyramid options widgets are not initialized at first
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:28,代码来源:doOverview.py


示例7: __init__

  def __init__( self, iface ):
      QWidget.__init__( self )
      self.iface = iface

      self.setupUi( self )
      BaseBatchWidget.__init__( self, self.iface, "gdal_fillnodata.py" )

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

      self.progressBar.setValue(0)
      self.progressBar.hide()
      self.formatLabel.hide()
      self.formatCombo.hide()

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus([
          ( self.inSelector, SIGNAL( "filenameChanged()" ) ),
          ( self.outSelector, SIGNAL( "filenameChanged()" ) ),
          ( self.maskSelector, SIGNAL( "filenameChanged()" ), self.maskCheck ),
          ( self.distanceSpin, SIGNAL( "valueChanged( int )" ), self.distanceCheck ),
          ( self.smoothSpin, SIGNAL( "valueChanged( int )" ), self.smoothCheck ),
          ( self.bandSpin, SIGNAL( "valueChanged( int )" ), self.bandCheck ),
          ( self.nomaskCheck, SIGNAL( "stateChanged( int )" ) )
      ])

      self.connect( self.inSelector, SIGNAL( "selectClicked()" ), self.fillInputFile )
      self.connect( self.outSelector, SIGNAL( "selectClicked()" ), self.fillOutputFile)
      self.connect( self.maskSelector, SIGNAL( "selectClicked()" ), self.fillMaskFile)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )

      # add raster filters to combo
      self.formatCombo.addItems( Utils.FileFilter.allRastersFilter().split( ";;" ) )
开发者ID:Ariki,项目名称:QGIS,代码行数:35,代码来源:doFillNodata.py


示例8: __init__

  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface

      self.setupUi(self)
      BaseBatchWidget.__init__(self, self.iface, "pct2rgb.py")

      # we use one widget for two tools, so change control labels
      self.base.setWindowTitle( self.tr( "Convert paletted image to RGB" ) )
      self.colorsCheck.setText( self.tr( "Band to convert:" ) )
      self.colorsSpin.setRange( 1, 256 )
      self.colorsSpin.setValue( 1 )

      self.progressBar.hide()

      self.outputFormat = Utils.fillRasterOutputFormat()

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

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFile)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )

      self.fillInputLayerCombo()
开发者ID:mmubangizi,项目名称:qgis,代码行数:30,代码来源:doPctRgb.py


示例9: __init__

  def __init__(self, iface, commandName, helpFileBaseName = None):
      BaseBatchWidget.__init__(self, iface, commandName, helpFileBaseName)

      layerMap = QgsMapLayerRegistry.instance().mapLayers()
      self.layerList = []
      for name, layer in layerMap.iteritems():
        if layer.type() == QgsMapLayer.RasterLayer:
          self.layerList.append( unicode( layer.name() ) )
开发者ID:zhangliye,项目名称:OpenTrans,代码行数:8,代码来源:doProjection.py


示例10: onFinished

  def onFinished(self, exitCode, status):
      if not self.isBatchEnabled():
        BaseBatchWidget.onFinished(self, exitCode, status)
        return

      oldFile = QFile( self.inFiles[self.batchIndex] )
      newFile = QFile( self.outFiles[self.batchIndex] )
      if oldFile.remove():
        newFile.rename(self.inFiles[self.batchIndex])

      BaseBatchWidget.onFinished(self, exitCode, status)
开发者ID:zhangliye,项目名称:OpenTrans,代码行数:11,代码来源:doProjection.py


示例11: __init__

  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.canvas = self.iface.mapCanvas()
      self.expand_method = ( 'gray', 'rgb', 'rgba' )

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

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

      # set the default QSpinBoxes and QProgressBar value
      self.outsizeSpin.setValue(25)
      self.progressBar.setValue(0)

      self.progressBar.hide()
      self.formatLabel.hide()
      self.formatCombo.hide()

      if Utils.Version( Utils.GdalConfig.version() ) < "1.7":
        index = self.expandCombo.findText('gray', Qt.MatchFixedString)
        if index >= 0:
          self.expandCombo.removeItem(index)

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.targetSRSEdit, SIGNAL("textChanged(const QString &)"), self.targetSRSCheck),
          (self.selectTargetSRSButton, None, self.targetSRSCheck),
          (self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox),
          (self.outsizeSpin, SIGNAL("valueChanged(const QString &)"), self.outsizeCheck),
          (self.nodataSpin, SIGNAL("valueChanged(int)"), self.nodataCheck),
          (self.expandCombo, SIGNAL("currentIndexChanged(int)"), self.expandCheck, "1.6.0"),
          (self.sdsCheck, SIGNAL("stateChanged(int)")),
          (self.srcwinEdit, SIGNAL("textChanged(const QString &)"), self.srcwinCheck),
          (self.prjwinEdit, SIGNAL("textChanged(const QString &)"), self.prjwinCheck)
        ]
      )

      #self.connect(self.canvas, SIGNAL("layersChanged()"), self.fillInputLayerCombo)
      self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillTargetSRSEditDefault)
      self.connect( self.inSelector, SIGNAL( "selectClicked()" ), self.fillInputFile )
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.selectTargetSRSButton, SIGNAL("clicked()"), self.fillTargetSRSEdit)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )

      # add raster filters to combo
      self.formatCombo.addItems( Utils.FileFilter.allRastersFilter().split( ";;" ) )
开发者ID:Nald,项目名称:Quantum-GIS,代码行数:51,代码来源:doTranslate.py


示例12: __init__

  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resampling_method = ('near', 'bilinear', 'cubic', 'cubicspline', 'lanczos')

      self.setupUi(self)
      BaseBatchWidget.__init__(self, self.iface, "gdalwarp")

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

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

      self.progressBar.hide()

      self.outputFormat = Utils.fillRasterOutputFormat()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.sourceSRSEdit, SIGNAL("textChanged(const QString &)"), self.sourceSRSCheck),
          (self.selectSourceSRSButton, None, self.sourceSRSCheck),
          (self.targetSRSEdit, SIGNAL("textChanged(const QString &)"), self.targetSRSCheck),
          (self.selectTargetSRSButton, None, self.targetSRSCheck),
          (self.resamplingCombo, SIGNAL("currentIndexChanged(int)"), self.resamplingCheck),
          (self.cacheSpin, SIGNAL("valueChanged(int)"), self.cacheCheck),
          ( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" ), self.resizeGroupBox ),
          (self.multithreadCheck, SIGNAL("stateChanged(int)")),
          (self.noDataEdit, SIGNAL( "textChanged( const QString & )" ), self.noDataCheck), 
          (self.maskSelector, SIGNAL("filenameChanged()"), self.maskCheck, "1.6.0"), 
        ]
      )

      self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillSourceSRSEditDefault)
      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFile)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
      self.connect(self.selectSourceSRSButton, SIGNAL("clicked()"), self.fillSourceSRSEdit)
      self.connect(self.selectTargetSRSButton, SIGNAL("clicked()"), self.fillTargetSRSEdit)
      self.connect(self.maskSelector, SIGNAL("selectClicked()"), self.fillMaskFile)
      self.connect( self.batchCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
开发者ID:carsonfarmer,项目名称:Quantum-GIS,代码行数:43,代码来源:doWarp.py


示例13: getBatchOutputFileName

 def getBatchOutputFileName(self, fn):
     # get GeoTiff
     fn = re.sub( r'\.[a-zA-Z]{2,4}$', r'.tif', fn )
     return BaseBatchWidget.getBatchOutputFileName( self, fn )
开发者ID:innotechsoftware,项目名称:Quantum-GIS,代码行数:4,代码来源:doProjection.py


示例14: getBatchOutputFileName

 def getBatchOutputFileName(self, fn):
     # get GeoTiff
     fn = QString( fn ).replace( QRegExp( "\.[a-zA-Z]{2,4}$" ), ".tif" )
     return BaseBatchWidget.getBatchOutputFileName( self, fn )
开发者ID:mmubangizi,项目名称:qgis,代码行数:4,代码来源:doProjection.py


示例15: show_

 def show_(self):
     BaseBatchWidget.show_(self)
     self.someValueChanged()
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:3,代码来源:doOverview.py


示例16: runItem

  def runItem(self, index, total):
      if index >= total:
        self.outFiles = self.inFiles

      BaseBatchWidget.runItem(self, index, total)
开发者ID:zhangliye,项目名称:OpenTrans,代码行数:5,代码来源:doProjection.py



注:本文中的widgetBatchBase.GdalToolsBaseBatchWidget类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python widgetPluginBase.GdalToolsBasePluginWidget类代码示例发布时间:2022-05-26
下一篇:
Python ui_utils.switch_tab函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap