def openModeler(self):
     dlg = ModelerDialog()
     dlg.show()
     dlg.exec_()
     if dlg.update:
         Processing.updateAlgsList()
         self.toolbox.updateProvider('model')
Exemple #2
0
    def initQGIS(self):
        basic.outputlogMessage("initial QGIS resource")
        #check qgis install
        b_found_qgis = False
        if os.path.isfile(
                os.path.join(qgis_opeation.qgis_install_folder,
                             'QGIS')) is True:
            b_found_qgis = True
        if os.path.isfile(
                os.path.join(qgis_opeation.qgis_install_folder, 'bin',
                             'qgis')) is True:
            b_found_qgis = True
        if b_found_qgis is False:
            basic.outputlogMessage('no QIGS installed in %s' %
                                   qgis_opeation.qgis_install_folder)
            return False

        self.__qgis_app = QgsApplication([], True)
        QgsApplication.setPrefixPath(qgis_opeation.qgis_install_folder, True)
        QgsApplication.initQgis()

        # providers = QgsProviderRegistry.instance().providerList()
        # for provider in providers:
        #     print provider
        Processing.initialize()
        Processing.updateAlgsList()
        basic.outputlogMessage("initial QGIS resource completed")
        pass
Exemple #3
0
 def openModeler(self):
     dlg = ModelerDialog()
     dlg.show()
     dlg.exec_()
     if dlg.update:
         Processing.updateAlgsList()
         self.toolbox.updateProvider('model')
Exemple #4
0
 def refresh_script_provider(self):
     """Refresh the processing script provider."""
     if qgis_version() < 21600:
         from processing.core.Processing import Processing
         Processing.updateAlgsList()
     else:
         from processing.core.alglist import algList
         algList.reloadProvider('script')
Exemple #5
0
 def updateProvider(self, providerName, updateAlgsList = True):
     if updateAlgsList:
         Processing.updateAlgsList()
     for i in xrange(self.algorithmTree.invisibleRootItem().childCount()):
         child = self.algorithmTree.invisibleRootItem().child(i)
         if isinstance(child, TreeProviderItem):
             if child.providerName == providerName:
                 child.refresh()
                 break
Exemple #6
0
 def updateProvider(self, providerName, updateAlgsList=True):
     if updateAlgsList:
         Processing.updateAlgsList()
     for i in xrange(self.algorithmTree.invisibleRootItem().childCount()):
         child = self.algorithmTree.invisibleRootItem().child(i)
         if isinstance(child, TreeProviderItem):
             if child.providerName == providerName:
                 child.refresh()
                 break
def generate_drivetimes_contour(raster_layer, interval, parent_dialog):
    """Create drive times contour

    :param raster_layer: Interpolated raster layer with drivetimes
    :type raster_layer: QgsRasterLayer

    :param interval: drivetimes interval
    :type interval: int

    :param parent_dialog: A dialog that called this function.
    :type parent_dialog: QProgressDialog

    :returns layer: Vector layer with contour drivetimes
    :rtype layer: QgsVectorLayer

    """
    drivetime_layer = None

    try:
        Processing.initialize()
        Processing.updateAlgsList()

        output_vector = processing.runalg(
                'gdalogr:contour',
                raster_layer,
                interval,
                'minutes',
                None,
                '[temporary_file]')

        drivetime_layer = QgsVectorLayer(
                output_vector['OUTPUT_VECTOR'],
                'time(min)',
                'ogr')

    except Exception as exception:  # pylint: disable=broad-except
            # noinspection PyCallByClass,PyTypeChecker,PyArgumentList
        if parent_dialog:
            display_warning_message_box(
                parent_dialog,
                parent_dialog.tr(
                    'Error'),
                parent_dialog.tr('Error loading isochrone map,'
                                 'please check if you have processing '
                                 'plugin installed '))
        else:
            display_warning_message_box(
                parent_dialog,
                'Error',
                'Error loading isochrone map,'
                'please check if you have processing '
                'plugin installed ')

    return drivetime_layer
Exemple #8
0
 def updateProvider(self, providerName, updateAlgsList=True):
     if updateAlgsList:
         Processing.updateAlgsList()
     for i in xrange(self.algorithmTree.invisibleRootItem().childCount()):
         child = self.algorithmTree.invisibleRootItem().child(i)
         if isinstance(child, TreeProviderItem):
             if child.providerName == providerName:
                 child.refresh()
                 # sort categories and items in categories
                 child.sortChildren(0, Qt.AscendingOrder)
                 for i in xrange(child.childCount()):
                     child.child(i).sortChildren(0, Qt.AscendingOrder)
                 break
 def updateProvider(self, providerName, updateAlgsList=True):
     if updateAlgsList:
         Processing.updateAlgsList()
     for i in xrange(self.algorithmTree.invisibleRootItem().childCount()):
         child = self.algorithmTree.invisibleRootItem().child(i)
         if isinstance(child, TreeProviderItem):
             if child.providerName == providerName:
                 child.refresh()
                 # sort categories and items in categories
                 child.sortChildren(0, Qt.AscendingOrder)
                 for i in xrange(child.childCount()):
                     child.child(i).sortChildren(0, Qt.AscendingOrder)
                 break
    def accept(self):
        for setting in self.items.keys():
            if isinstance(setting.value, bool):
                setting.setValue(self.items[setting].checkState() == Qt.Checked)
            else:
                try:
                    setting.setValue(unicode(self.items[setting].text()))
                except ValueError as e:
                    QMessageBox.warning(self, self.tr('Wrong value'),
                                        self.tr('Wrong value for parameter "%s":\n\n%s' % (setting.description, unicode(e))))
                    return
            setting.save()
        Processing.updateAlgsList()

        QDialog.accept(self)
Exemple #11
0
 def accept(self):
     qsettings = QgsSettings()
     for setting in list(self.items.keys()):
         if setting.group != menusSettingsGroup or self.saveMenus:
             if isinstance(setting.value, bool):
                 setting.setValue(self.items[setting].checkState() == Qt.Checked)
             else:
                 try:
                     setting.setValue(str(self.items[setting].text()))
                 except ValueError as e:
                     QMessageBox.warning(self, self.tr('Wrong value'),
                                         self.tr('Wrong value for parameter "{0}":\n\n{1}').format(setting.description, str(e)))
                     return
             setting.save(qsettings)
     Processing.updateAlgsList()
     settingsWatcher.settingsChanged.emit()
Exemple #12
0
    def accept(self):
        for setting in list(self.items.keys()):
            if isinstance(setting.value, bool):
                setting.setValue(self.items[setting].checkState() == Qt.Checked)
            else:
                try:
                    setting.setValue(str(self.items[setting].text()))
                except ValueError as e:
                    QMessageBox.warning(self, self.tr('Wrong value'),
                                        self.tr('Wrong value for parameter "%s":\n\n%s' % (setting.description, str(e))))
                    return
            setting.save()
        Processing.updateAlgsList()
        settingsWatcher.settingsChanged.emit()

        QDialog.accept(self)
Exemple #13
0
def heatmap(table):
    """TODO
    Still having issues running the alg from terminal
    """

    from qgis.core import QgsVectorLayer, QgsDataSourceURI, QgsApplication
    from PyQt4.QtGui import QApplication
    qgs = QgsApplication([], True, None)
    qgs.setPrefixPath("/usr/bin", True)
    sys.path.append('/usr/share/qgis/python/plugins')
    from processing.core.Processing import Processing
    qgs.initQgis()

    #app = QApplication([])
    Processing.initialize()
    Processing.updateAlgsList()
    params = cnx_params.blight
    db = params['db']
    host = params['host']
    user = params['user']
    pwd = params['password']
    dbcnx = ("dbname='{db}' host={host} port=5432 "
             "user='******' password='******'")
    id_field = "uid"
    table = ("(select row_number() over () as uid, li_type, "
             "count(li_type), parcelnumb, "
             "st_centroid(wkb_geometry) geom_pt "
             "from clean_stat.survey_issues, sca_parcels "
             "where li_type = '{1}' and parcelnumb = parcelid "
             "group by parcelnumb, li_type, wkb_geometry)")
    uri = "{0} key={1} table={2} (geom_pt) sql="
    lyr = QgsVectorLayer(
        uri.format(
            dbcnx.format(**params),
            id_field,
            table.format("ll", "LL"),
        ), "li_type_ll_test", "postgres")
    Processing.runAlgorithm("saga:kerneldensityestimation", lyr, "count", 300,
                            0, ("754005.201649,760791.665104,"
                                "316181.236576,323293.188451"), 25, 0,
                            "/home/nate/temp/ll_del.tif")
    uri = QgsDataSourceURI()
    uri.setConnection(host, '5432', db, user, pwd, sslmode=uri.SSLrequire)
    uri.setDataSource('clean_stat', table, 'geom_pt', "", "uid")
    lyr = QgsVectorLayer(uri.uri(False), table, "postgres")
    processing.runalg("saga:kerneldensityestimation", lyr, "count", 300., 0,
                      "", 25, 0, "/home/nate/temp/ll_del.tif")
Exemple #14
0
    def accept(self):
        for setting in self.items.keys():
            if isinstance(setting.value, bool):
                setting.value = self.items[setting].checkState() == Qt.Checked
            elif isinstance(setting.value, (float, int, long)):
                value = unicode(self.items[setting].text())
                try:
                    value = float(value)
                    setting.value = value
                except ValueError:
                    QMessageBox.critical(self, self.tr("Wrong value"), self.tr("Wrong parameter value:\n%1") % value)
                    return
            else:
                setting.value = unicode(self.items[setting].text())
            setting.save()
        Processing.updateAlgsList()

        QDialog.accept(self)
Exemple #15
0
 def accept(self):
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     for setting in list(self.items.keys()):
         if setting.group != menusSettingsGroup or self.saveMenus:
             if isinstance(setting.value, bool):
                 setting.setValue(self.items[setting].checkState() == Qt.Checked)
             else:
                 try:
                     setting.setValue(str(self.items[setting].text()))
                 except ValueError as e:
                     QMessageBox.warning(self, self.tr('Wrong value'),
                                         self.tr('Wrong value for parameter "%s":\n\n%s' % (setting.description, str(e))))
                     return
             setting.save()
     Processing.updateAlgsList()
     settingsWatcher.settingsChanged.emit()
     QApplication.restoreOverrideCursor()
     QDialog.accept(self)
Exemple #16
0
def generate_drivetimes_contour(raster_layer, interval, parent_dialog):
    """Create drive times contour

    :param raster_layer: Interpolated raster layer with drivetimes
    :type raster_layer: QgsRasterLayer

    :param interval: drivetimes interval
    :type interval: int

    :param parent_dialog: A dialog that called this function.
    :type parent_dialog: QProgressDialog

    :returns layer: Vector layer with contour drivetimes
    :rtype layer: QgsVectorLayer

    """
    drivetime_layer = None

    try:
        Processing.initialize()
        Processing.updateAlgsList()

        output_vector = processing.runalg('gdalogr:contour', raster_layer,
                                          interval, 'minutes', None,
                                          '[temporary_file]')

        drivetime_layer = QgsVectorLayer(output_vector['OUTPUT_VECTOR'],
                                         'time(min)', 'ogr')

    except Exception as exception:  # pylint: disable=broad-except
        # noinspection PyCallByClass,PyTypeChecker,PyArgumentList
        if parent_dialog:
            display_warning_message_box(
                parent_dialog, parent_dialog.tr('Error'),
                parent_dialog.tr('Error loading isochrone map,'
                                 'please check if you have processing '
                                 'plugin installed '))
        else:
            display_warning_message_box(
                parent_dialog, 'Error', 'Error loading isochrone map,'
                'please check if you have processing '
                'plugin installed ')

    return drivetime_layer
Exemple #17
0
    def accept(self):
        for setting in self.items.keys():
            if isinstance(setting.value, bool):
                setting.value = self.items[setting].checkState() == Qt.Checked
            elif isinstance(setting.value, (float, int, long)):
                value = unicode(self.items[setting].text())
                try:
                    value = float(value)
                    setting.value = value
                except ValueError:
                    QMessageBox.critical(self, self.tr('Wrong value'),
                                         self.tr('Wrong parameter value:\n%1') % value)
                    return
            else:
                setting.value = unicode(self.items[setting].text())
            setting.save()
        Processing.updateAlgsList()

        QDialog.accept(self)
Exemple #18
0
 def accept(self):
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     qsettings = QSettings()
     for setting in list(self.items.keys()):
         if setting.group != menusSettingsGroup or self.saveMenus:
             if isinstance(setting.value, bool):
                 setting.setValue(self.items[setting].checkState() == Qt.Checked)
             else:
                 try:
                     setting.setValue(str(self.items[setting].text()))
                 except ValueError as e:
                     QMessageBox.warning(self, self.tr('Wrong value'),
                                         self.tr('Wrong value for parameter "%s":\n\n%s' % (setting.description, str(e))))
                     return
             setting.save(qsettings)
     Processing.updateAlgsList()
     settingsWatcher.settingsChanged.emit()
     QApplication.restoreOverrideCursor()
     QDialog.accept(self)
Exemple #19
0
    def setUp(self):
        # setup Qgis
        qgs = qgis.core.QgsApplication(sys.argv, True)
        qgs.setPrefixPath(os.path.expandvars(r"$QGIS_PATH"), True)
        qgs.initQgis()
        Processing.initialize()
        Processing.updateAlgsList()

        # Load layers
        self.demand_polygon_fl = qgis.core.QgsVectorLayer(
            r"../sample_data/demand_polygon.shp", "demand_polygon_fl", "ogr")
        self.facility_service_areas_fl = qgis.core.QgsVectorLayer(
            r"../sample_data/facility_service_areas.shp",
            "facility_service_areas_fl", "ogr")
        self.demand_point_fl = qgis.core.QgsVectorLayer(
            r"../sample_data/demand_point.shp", "demand_point_fl", "ogr")
        self.facility2_service_areas_fl = qgis.core.QgsVectorLayer(
            r"../sample_data/facility2_service_areas.shp",
            "facility2_service_areas_fl", "ogr")
        # Load 'golden' coverages
        # Read the coverages
        with open("valid_coverages/partial_coverage1.json", "r") as f:
            self.partial_coverage = json.load(f)
        with open("valid_coverages/binary_coverage_polygon1.json", "r") as f:
            self.binary_coverage_polygon = json.load(f)
        with open("valid_coverages/binary_coverage_point1.json", "r") as f:
            self.binary_coverage_point = json.load(f)

        with open("valid_coverages/partial_coverage2.json", "r") as f:
            self.partial_coverage2 = json.load(f)
        with open("valid_coverages/binary_coverage_polygon2.json", "r") as f:
            self.binary_coverage_polygon2 = json.load(f)
        with open("valid_coverages/binary_coverage_point2.json", "r") as f:
            self.binary_coverage_point2 = json.load(f)

        with open("valid_coverages/serviceable_demand_polygon.json", "r") as f:
            self.serviceable_demand_polygon = json.load(f)
        with open("valid_coverages/serviceable_demand_point.json", "r") as f:
            self.serviceable_demand_point = json.load(f)
Exemple #20
0
 def initGui(self):
     Processing.addProvider(self.provider, updateList=True)
     Processing.updateAlgsList()
def idw_interpolation(layer, parent_dialog):
    """Run interpolation using inverse distance weight algorithm

    :param layer: Vector layer with drivetimes
    :type layer: QgsVectorLayer

    :param parent_dialog: A dialog that called this function.
    :type parent_dialog: QProgressDialog

    :returns raster_layer: Interpolated raster layer with drivetimes
    :rtype raster_layer: QgsRasterLayer

    """
    raster_layer = None
    try:
        Processing.initialize()
        Processing.updateAlgsList()

        output_raster = processing.runalg(
        'gdalogr:gridinvdist',
        layer,
        'minutes',
        2, 0, 0, 0, 0, 0, 0, 0, 5,
        "[temporary file]")

        output_file = output_raster['OUTPUT']
        file_info = QFileInfo(output_file)
        base_name = file_info.baseName()

        # retrieving the raster output , styling it and load it in Qgis

        raster_layer = QgsRasterLayer(output_file, base_name)

    except Exception as exception:  # pylint: disable=broad-except
            # noinspection PyCallByClass,PyTypeChecker,PyArgumentList
        if parent_dialog:
                display_warning_message_box(
                    parent_dialog,
                    parent_dialog.tr(
                        'Error'),
                    parent_dialog.tr('Error loading isochrone map,'
                                     'please check if you have processing '
                                     'plugin installed '))
        else:
            display_warning_message_box(
                parent_dialog,
                'Error',
                'Error loading isochrone map,'
                'please check if you have processing '
                'plugin installed ')

    if raster_layer:
        if raster_layer.isValid():
            color_shader = QgsColorRampShader()
            color_shader.setColorRampType(QgsColorRampShader.INTERPOLATED)
            colors = {
                'deep_green': '#1a9641',
                'light_green': '#a6d96a',
                'pale_yellow': '#ffffc0',
                'light_red': '#fdae61',
                'red': '#d7191c'
            }
            provider = raster_layer.dataProvider()
            stats = provider.bandStatistics(
                1,
                QgsRasterBandStats.All,
                raster_layer.extent(),
                0)

            values = {}

            if stats:
                min = stats.minimumValue
                max = stats.maximumValue
                stat_range = max - min
                add = stat_range / 4
                values[0] = min
                value = min
                for index in range(1, 4):
                    value += add
                    values[index] = value
                values[4] = max
            else:
                display_warning_message_box(
                    parent_dialog,
                    parent_dialog.tr(
                        'Error'),
                    parent_dialog.tr('Error loading isochrone map'
                                     ' Problem indexing the isochrones map'))

            color_list = [
                QgsColorRampShader.ColorRampItem(
                    values[0],
                    QColor(colors['deep_green'])),
                QgsColorRampShader.ColorRampItem(
                    values[1],
                    QColor(colors['light_green'])),
                QgsColorRampShader.ColorRampItem(
                    values[2],
                    QColor(colors['pale_yellow'])),
                QgsColorRampShader.ColorRampItem(
                    values[3],
                    QColor(colors['light_red'])),
                QgsColorRampShader.ColorRampItem(
                    values[4],
                    QColor(colors['red']))
            ]

            color_shader.setColorRampItemList(color_list)
            raster_shader = QgsRasterShader()
            raster_shader.setRasterShaderFunction(color_shader)

            renderer = QgsSingleBandPseudoColorRenderer(
                raster_layer.dataProvider(),
                1,
                raster_shader)
            raster_layer.setRenderer(renderer)

        else:
            if parent_dialog:
                display_warning_message_box(
                    parent_dialog,
                    parent_dialog.tr(
                        'Problem'),
                    parent_dialog.tr('Problem styling the isochrone map'))
            else:
                display_warning_message_box(
                    parent_dialog,
                    'Problem',
                    'Problem styling the isochrone map')

        QgsMapLayerRegistry.instance().addMapLayers([raster_layer])

    else:
        if parent_dialog:

            display_warning_message_box(
                parent_dialog,
                parent_dialog.tr(
                    'Error'),
                parent_dialog.tr('Error loading isochrone map '
                                 'Could not load interpolated file!'))
        else:
            display_warning_message_box(
                parent_dialog,
                'Error',
                'Error loading isochrone map '
                'Could not load interpolated file!')

    return raster_layer
Exemple #22
0
 def initGui(self):
     Processing.addProvider(self.provider)
     Processing.updateAlgsList()  # until a better way is found
Exemple #23
0
import operator
from qgis.core import *
# Next 3 lines MUST be in this order
app = QgsApplication([], True)
# QgsApplication.setPrefixPath('/Applications/QGIS.app/Contents/Plugins', True)
QgsApplication.setPrefixPath('/Applications/QGIS.app/Contents/MacOS', True)

app.initQgis()
import PyQt4
# from PyQt4 import QtCore, QtGui
# from PyQt4.QtGui import *
from PyQt4.QtCore import QVariant
import processing
from processing.core.Processing import Processing
Processing.initialize()
Processing.updateAlgsList()

# # Create output folder if not created
if not outputPath:
    outputPath = os.path.join(os.path.dirname(inputPath), 'outputs')
    if not os.path.isdir(outputPath):
        os.mkdir(outputPath)

# # Copy files to output folder (to preserve input files and folder)
# rgiSrc = os.path.join(inputPath, rgiPolygonShapefile)
# lineSrc = os.path.join(inputPath, centerlineShapefile)
# my_utility.copyShapefile(rgiSrc, outputPath)
# my_utility.copyShapefile(lineSrc, outputPath)
# # All processing will occur in output folder, so source filepaths are set to the copied files.
# rgiSrc = os.path.join(outputPath, rgiPolygonShapefile)
# lineSrc = os.path.join(outputPath, centerlineShapefile)
Exemple #24
0
 def updateTree(self):
     Processing.updateAlgsList()
Exemple #25
0
 def refresh(self):
     self.takeChildren()
     Processing.updateAlgsList()
     self.populate()
Exemple #26
0
def idw_interpolation(layer, parent_dialog):
    """Run interpolation using inverse distance weight algorithm

    :param layer: Vector layer with drivetimes
    :type layer: QgsVectorLayer

    :param parent_dialog: A dialog that called this function.
    :type parent_dialog: QProgressDialog

    :returns raster_layer: Interpolated raster layer with drivetimes
    :rtype raster_layer: QgsRasterLayer

    """
    raster_layer = None
    try:
        Processing.initialize()
        Processing.updateAlgsList()

        output_raster = processing.runalg('gdalogr:gridinvdist', layer,
                                          'minutes', 2, 0, 0, 0, 0, 0, 0, 0, 5,
                                          "[temporary file]")

        output_file = output_raster['OUTPUT']
        file_info = QFileInfo(output_file)
        base_name = file_info.baseName()

        # retrieving the raster output , styling it and load it in Qgis

        raster_layer = QgsRasterLayer(output_file, base_name)

    except Exception as exception:  # pylint: disable=broad-except
        # noinspection PyCallByClass,PyTypeChecker,PyArgumentList
        if parent_dialog:
            display_warning_message_box(
                parent_dialog, parent_dialog.tr('Error'),
                parent_dialog.tr('Error loading isochrone map,'
                                 'please check if you have processing '
                                 'plugin installed '))
        else:
            display_warning_message_box(
                parent_dialog, 'Error', 'Error loading isochrone map,'
                'please check if you have processing '
                'plugin installed ')

    if raster_layer:
        if raster_layer.isValid():
            color_shader = QgsColorRampShader()
            color_shader.setColorRampType(QgsColorRampShader.INTERPOLATED)
            colors = {
                'deep_green': '#1a9641',
                'light_green': '#a6d96a',
                'pale_yellow': '#ffffc0',
                'light_red': '#fdae61',
                'red': '#d7191c'
            }
            provider = raster_layer.dataProvider()
            stats = provider.bandStatistics(1, QgsRasterBandStats.All,
                                            raster_layer.extent(), 0)

            values = {}

            if stats:
                min = stats.minimumValue
                max = stats.maximumValue
                stat_range = max - min
                add = stat_range / 4
                values[0] = min
                value = min
                for index in range(1, 4):
                    value += add
                    values[index] = value
                values[4] = max
            else:
                display_warning_message_box(
                    parent_dialog, parent_dialog.tr('Error'),
                    parent_dialog.tr('Error loading isochrone map'
                                     ' Problem indexing the isochrones map'))

            color_list = [
                QgsColorRampShader.ColorRampItem(values[0],
                                                 QColor(colors['deep_green'])),
                QgsColorRampShader.ColorRampItem(values[1],
                                                 QColor(
                                                     colors['light_green'])),
                QgsColorRampShader.ColorRampItem(values[2],
                                                 QColor(
                                                     colors['pale_yellow'])),
                QgsColorRampShader.ColorRampItem(values[3],
                                                 QColor(colors['light_red'])),
                QgsColorRampShader.ColorRampItem(values[4],
                                                 QColor(colors['red']))
            ]

            color_shader.setColorRampItemList(color_list)
            raster_shader = QgsRasterShader()
            raster_shader.setRasterShaderFunction(color_shader)

            renderer = QgsSingleBandPseudoColorRenderer(
                raster_layer.dataProvider(), 1, raster_shader)
            raster_layer.setRenderer(renderer)

        else:
            if parent_dialog:
                display_warning_message_box(
                    parent_dialog, parent_dialog.tr('Problem'),
                    parent_dialog.tr('Problem styling the isochrone map'))
            else:
                display_warning_message_box(
                    parent_dialog, 'Problem',
                    'Problem styling the isochrone map')

        QgsMapLayerRegistry.instance().addMapLayers([raster_layer])

    else:
        if parent_dialog:

            display_warning_message_box(
                parent_dialog, parent_dialog.tr('Error'),
                parent_dialog.tr('Error loading isochrone map '
                                 'Could not load interpolated file!'))
        else:
            display_warning_message_box(
                parent_dialog, 'Error', 'Error loading isochrone map '
                'Could not load interpolated file!')

    return raster_layer
 def updateTree(self):
     Processing.updateAlgsList()
 def initGui(self):
     Processing.addProvider(self.provider)
     Processing.updateAlgsList()  # until a better way is found
Exemple #29
0
 def refresh(self):
     self.takeChildren()
     Processing.updateAlgsList()
     self.populate()